-
sql query
Hello, I have this table in Microsoft SQL.
table
ref Type Description
aaa 1 rossi mario
aaa 2 via Verdi 1
aaa 3 20124 Milano
bbb 1 bianchi nicola
bbb 2 via Roma 4
bbb 3 20100 Milano
I need to use data in office compilation, so i wish to obtain an excel sheet with a sql query structured in this way:
ref Description 1 Description 2 Description 3
aaa rossi mario via Verdi 1 20124 Milano
bbb bianchi nicola via Roma 4 20100 Milano
How may I obtain this ?
Thanks
Stefano
-
Which version of sql server you have? Take look at pivot operator in books online if you have sql2k5 or up.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|