I have a table accts in Oracle 8i from which I want to select cust and acctno. Each customer can have more than 1 acctno. So select cust,acctno order by cust,acctno from accts returns
cust acct
1 989
1 990
2 010
2 011
2 012
3 001
4 800
etc.
I can product a comma delimited file from this okay, but I want one that has all acctno's with 1 cust ie
1,989,990
2,010,011,012
3,001
4,800
etc.
Apart from writing a function with a cursor, is there any neat way to do this?
cust acct
1 989
1 990
2 010
2 011
2 012
3 001
4 800
etc.
I can product a comma delimited file from this okay, but I want one that has all acctno's with 1 cust ie
1,989,990
2,010,011,012
3,001
4,800
etc.
Apart from writing a function with a cursor, is there any neat way to do this?