July 8, 2005 at 8:37 am
Hello,
I have two columns. One with a person's name and another of that person's dog. What I want to do is merge the columns into one so that the person's name appears and then the dogs right under. Then the next person, then their dog, etc. Any idea on how to do this?
Sarah
July 8, 2005 at 8:44 am
Looking for something like this?
Select PersonName + ', ' + DogName as FullName from dbo.YourTable
Note that this assumes that you don't have nulls in the table.
July 8, 2005 at 8:54 am
no...I definitly need the dog on the line below the owner.
Is there a write line command or something to make the dog go to the next line?
July 8, 2005 at 8:56 am
Select PersonName + Char(13) + char(10) + DogName as FullName from dbo.YourTable
BTW this is something that you should do on the client side, not in the query. It's something very easy to do in vb.
July 8, 2005 at 8:59 am
how would you do that in VB?
July 8, 2005 at 9:08 am
me.txtbox.text = myrs.fields("Field1").value & vbcrlf & myrs.fields("Field2").value
July 8, 2005 at 9:09 am
Or actually put the 2 textbox one above the other .
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply