|
-
 Originally Posted by ebrian
Thanks for the create scripts !
Code:
SQL> select col1 val,
2 max(decode(col2, 'Option1', col3)) Option1,
3 max(decode(col2, 'Option2', col3)) Option2,
4 max(decode(col2, 'Option3', col3)) Option3,
5 max(decode(col2, 'Option4', col3)) Option4,
6 max(decode(col2, 'Option5', col3)) Option5
7 from temp1
8 group by col1
9 order by 1;
VAL OPTION1 OPTION2 OPTION3 OPTION4 OPTION5
---------- ---------- ---------- ---------- ---------- ----------
1 Val1 Val2 Val3 Val4 Val5
2 Val6 Val7 Val8
3 Val9 Val10 Val11 Val12
Great! That was what I was looking for! I guess I was messing up somewhere using the group clause
Hey! and to all the guys that took the time, Thanks for your help!!
Tags for this Thread
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
|
Click Here to Expand Forum to Full Width
|