469,626 Members | 949 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

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 2184
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
By using this site, you agree to our Privacy Policy and Terms of Use.