472,125 Members | 1,558 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,125 software developers and data experts.

Clubbing of multiple rows data in one column

I have a form through which, e-mail address of parties are showing through datasheet mode. Is their any way to club the data of multiple rows in one column?

Like :


ajaimathur@rediffmail.com
amarnathmishra@rediffmail.com

To

ajaimathur@rediffmail.com;amarnathmishra@rediffmai l.com;


Shall be thankful if you kindly help me to solve my problem.
Aug 23 '07 #1
1 2276
dip_developer
648 Expert 512MB
I have a form through which, e-mail address of parties are showing through datasheet mode. Is their any way to club the data of multiple rows in one column?

Like :


ajaimathur@rediffmail.com
amarnathmishra@rediffmail.com

To

ajaimathur@rediffmail.com;amarnathmishra@rediffmai l.com;


Shall be thankful if you kindly help me to solve my problem.
are you trying to do this in your query...I dont think it is possible through SQL......
if the data is in a datatable then just loop through the table and concatenate the values ........
I dont know which language you are using....nut here is a sample in VB.NET................

Expand|Select|Wrap|Line Numbers
  1.  Dim mailAddress as String 
  2. Dim ConcatenatedMailAddress as string
  3. For i As Integer=0 To myTable.Rows.Count-1
  4. mailAddress=myTable.Rows(0).Item(i).ToString
  5. ConcatenatedMailAddress += mailAddress & ";"
  6. Next i
  7.  
Aug 23 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Rigga | last post: by
3 posts views Thread by gregory.sharrow | last post: by
6 posts views Thread by Fan Ruo Xin | last post: by
1 post views Thread by Craig Banks | last post: by
7 posts views Thread by samoore33 | last post: by
7 posts views Thread by =?Utf-8?B?TG9zdEluTUQ=?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.