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)
 Using Case

Author  Topic 

akalehzan
Starting Member

21 Posts

Posted - 2007-12-09 : 19:09:59
Hi All,


I have a table with the following columns and records:


using select :

select Subj_num, IQ, Times from wisc
where subj_num = 165

Subj_num : IQ : Times
165 : 112 : TravelT1
165 : 115 : TravelT2



I like to use case or any other way to have report output as:




Subj_num IQ : Times1 : Times2
165 112 : TravelT1 :
165 115 : : TravelT2



Any advice?

Thanks in advance,

Abrahim

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-12-09 : 19:43:58
Can you do this in your front end application or reporting tool ? It will be much easier to do it there.

SQL is not mean for presentation of data but rather storage and manipulation of data


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

akalehzan
Starting Member

21 Posts

Posted - 2007-12-09 : 20:48:17
We don't have any front-end reporting tool yet.

Abrahim
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-12-09 : 21:06:30
[code]
select
Subj_num
,IQ
,case when Times='TravelT1' then Times end as Times1
,case when Times='TravelT2' then Times end as Times2
,...
from wisc
where subj_num = 165
[/code]


elsasoft.org
Go to Top of Page

akalehzan
Starting Member

21 Posts

Posted - 2007-12-09 : 22:22:29
Thanks jezemine
Abrahim
Go to Top of Page
   

- Advertisement -