Hi
I am trying to query a table and return the results all in one field.
My table basicly looks like this:
tblBody:
ID Body
1 This is body 1
2 This is body 2
3 This is body 3
Now i want to select all this data, and concatenate it into one field
So when i do:
SELECT Body FROM tblBody (altered to be the right way of doing this of
course)
The results are:
Body
This is body 1This is body 2This is body 3
and not
Body
1 This is Body 1
2 This is Body 2
3 This is Body 3
TIAhttp://www.aspfaq.com/show.asp?id=2529
"Grant Merwitz" wrote:
> Hi
> I am trying to query a table and return the results all in one field.
> My table basicly looks like this:
> tblBody:
> ID Body
> 1 This is body 1
> 2 This is body 2
> 3 This is body 3
> Now i want to select all this data, and concatenate it into one field
> So when i do:
> SELECT Body FROM tblBody (altered to be the right way of doing this of
> course)
> The results are:
> Body
> This is body 1This is body 2This is body 3
> and not
> Body
> 1 This is Body 1
> 2 This is Body 2
> 3 This is Body 3
> TIA
>
>|||Thanks, that was exactly what i was looking for.
But now i've realised another problem:
The fields i'm trying to join are all of varchar(4000)
So i don't believe there's a variable i can store these in to return in a
Sql query.
Is there?
I may have to return multiple rows and join them in my business layer.
Thanks for you help, any thoughts here?
"SQL" <SQL@.discussions.microsoft.com> wrote in message
news:63B64C15-2098-4802-B189-60EF51BA668E@.microsoft.com...[vbcol=seagreen]
> http://www.aspfaq.com/show.asp?id=2529
>
> "Grant Merwitz" wrote:
>
No comments:
Post a Comment