Page 1 of 1

Need SQL Help

Posted: Tue Jul 17, 2007 2:51 am
by zeenat khan
i have two Tables
A and B

data in tables as

Table A
-------
SNo Sname
1 a
2 b
3 c

Table B
--------
SNo Course
1 x
1 y
1 k
1 z
2 x
2 z
2 d
3 y
3 z
3 e

I need the output in the following format where course is x or y or z.

1 x y z
2 x z
3 y z

Posted: Thu Aug 30, 2007 1:27 am
by amirtai
It's a some how cross table transformation. I would use decode() function to get desired result.

Thanks
Amir