How to flatten / horizontalize multiple records in Teradata ....using recursion

Database

How to flatten / horizontalize multiple records in Teradata ....using recursion

I know we can use a case info but what if the records are in millions..how do you flatten this using recursion in Teradata.
Input
sel
accID /* this goes in millions */ ,
access level /*1 Acc iD -- > multiple access levels but range from L1 through L7 */,
acc owner,
acc manager
from
foobar.accmastertb

I/P : -
ACID ACCESS_LEVEL ACC_OWNER ACC_Manager
1234 L1 Jack Ass
1234 L4 Jack Ass
3456 L6 James Bond
3456 L7 Justin hoffman

O/P
1234 L1,L4 Jack Ass
3456 L6 James Bond
3456 L7 Justin hoffman
3 REPLIES

Re: How to flatten / horizontalize multiple records in Teradata ....using recursion

'knowledgeable folks'..you may ignore the above. I toiled out a solution and works just well.

Re: How to flatten / horizontalize multiple records in Teradata ....using recursion

Just curious? Can you post your solution.

Re: How to flatten / horizontalize multiple records in Teradata ....using recursion

Not rocket science.

You may find an example here (in spanish, as always):

http://carlosal.wordpress.com/2008/10/15/queries-recursivas-en-teradata/

HTH.

Cheers.

Carlos.