Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 SQL Query Problem

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-04-28 : 14:02:33
Alefiya writes "using pubs database .. this is my query :I am using SQL Server 2000
Query :
select title,titles.title_id,price,notes,type,pub_name as Publisher,pubdate as Publication,au_fname as authors
from titles
inner join Publishers on titles.pub_id = Publishers.pub_id
inner join titleauthor on titleauthor.title_id = titles.title_id
inner join authors on titleauthor.au_id = authors.au_id

The above query returns duplicate title id with different authors. I want the authors with duplicate title id to be in different columns in a single row.I want to use the query in crystal reports generation."

cas_o
Posting Yak Master

154 Posts

Posted - 2004-04-28 : 16:26:20
You need to pivot the data

[url]http://www.sqlteam.com/item.asp?ItemID=2955[/url]

;-]
Go to Top of Page
   

- Advertisement -