View Single Post
  #3 (permalink)  
Old August 2nd, 2007, 04:57 AM
anjurenjith anjurenjith is offline
Registered User
 
Join Date: Aug 2007
Location: Bangalore, Bangalore, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi rodmcleay,
:)
hope u r fine. I went thru ur question and u an do it without using temporary tables. the query can be written as given below

Select A.Id as Id ,
A.GroupId as GroupId ,
A.Field1 as Field1,
A.Field2 as Field2,
A.Field3 as Field3
From
(
Select Id,
GroupId ,
Case when FieldId=1
Then FieldValue as Field1,
Case when FieldId=2
Then FieldValue as Field2,
Case when FieldId=3
Then FieldValue as Field3
From tblTestData
)A

Do try it out and lemme know if it doesnt work..

Thanks and Regards,
Anju Renjith
Reply With Quote