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
 SQL Server Development (2000)
 customize sql header result

Author  Topic 

vinothrao84
Starting Member

21 Posts

Posted - 2007-10-10 : 22:16:15
hi,

In my sql table having the following data

fund_name.....unit_price............date
GF...............2.3.............10/10/2007
IF...............2.5.............07/10/2007
BF...............1.5.............01/10/2007
GF...............1.3.............06/10/2007
GF...............0.9.............07/10/2007
IF...............2.5.............11/07/2007
BF...............1.9.............20/09/2007
BF...............1.8.............02/10/2007
IF...............1.4.............10/05/2007
GF...............1.7.............08/10/2007
more records continue...

can i create a sql select script that return as below result

GF.......IF........BF.........Date
2.3......2.5.......1.5......10/10/2007
1.3......1.4.......1.9......10/10/2007
0.9......2.5.......1.8......10/10/2007
1.7................1.4......10/10/2007

for the Date it can have the where clause statement.

i want to make the fund_name as the column header result of sql statement.

please help me. i'm stuck.

Thx.

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-10-10 : 23:01:48
Take look at 'cross-tab report' in books online.
Go to Top of Page
   

- Advertisement -