Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Append vertical row result into Horizontal

$
0
0

Dear Experts,

                        I want to append vertical row result into horizontal

CREATE  TABLE  #mable(mid INT, token nvarchar(16))


INSERT INTO #mable VALUES (0, 'foo')
INSERT INTO #mable VALUES(0, 'goo')
INSERT INTO #mable VALUES(1, 'hoo')
INSERT INTO #mable VALUES(1, 'moo')

Actual output

---------------------------

MIDTOKEN
0foo
0goo
1hoo
1moo

Desire output

-------------------------

MIDTOKENMIDTOKEN
0foo0goo
1hoo1moo

Please help .Awaiting for response.


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>