Combine record
am 18.08.2007 02:05:15 von neolempires2
Hi guys..
is there any query to do this action:
i want to combine view record into a single record.
exm.
table 1
Name A B
Jack 10 22
jack 12 21
jack ... ....
jack 1 11
ben 12 2
ben 3 2
ben ... ...
into:
View 1
Name combine
jack 10,22 and 12,21and1,11 and .....
ben 12,2 and 3,2 and......
thx before..
Re: Combine record
am 18.08.2007 23:17:12 von Erland Sommarskog
dede (neolempires2@gmail.com) writes:
> is there any query to do this action:
> i want to combine view record into a single record.
> exm.
>
> table 1
> Name A B
> Jack 10 22
> jack 12 21
> jack ... ....
> jack 1 11
> ben 12 2
> ben 3 2
> ben ... ...
>
>
> into:
> View 1
> Name combine
> jack 10,22 and 12,21and1,11 and .....
> ben 12,2 and 3,2 and......
Check out http://www.projectdmx.com/tsql/rowconcatenate.aspx for
suggestions.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx