|
Posted by louisyoung187@hotmail.com on 11/07/06 11:21
Hi there
I have the following two tables
mainprofile (profile varchar(20), description)
accprofile (profile varchar(20), acct_type int)
Sample data could be
mainprofile
----------------
prof1 | profile one
prof2 | profile two
prof3 | profile three
accprofile
--------------
prof1 | 0
prof1 | 1
prof1 | 2
prof2 | 0
Now doing a join between these two tables would return multiple rows,
but I would like to know whether it would be possible to return
acct_type horizontally in a column of the result set, e.g.
prof1 | profile one | [0,1,2]
prof2 | profile two | [0]
I could probably manage this with cursors, but it would be very
resource intensive. Is there a better way?
Regards,
Louis
Navigation:
[Reply to this message]
|