View previous topic :: View next topic |
Author |
Message |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu May 20, 2004 4:40 am Post subject: |
|
|
Ravi,
what exactly do you mean single query? Do you want the results without using join?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu May 20, 2004 4:55 am Post subject: |
|
|
Ravi,
Hmm wouldn't that be a recursive sql? And DB2 is not yet there for recursive sql's. However you can get the results using User defined functions. I am not sure if SYBASE supports recursive sql
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
bauer Intermediate
Joined: 10 Oct 2003 Posts: 317 Topics: 50 Location: Germany
|
Posted: Mon May 24, 2004 11:21 am Post subject: |
|
|
Ravi,
1) i agree with kolusu, recursive sql is not possible with DB2 / OS390 / Version 7.2
2) if the maximum number of levels is fix and not to large, you should try a solution with left outer joins to join the next level if levle available
3) recursive sql: Check the WITH clause; i cann't remember the exactly syntax using other sql than OS/390
Your problem looks like a parts list problem ? |
|
Back to top |
|
 |
|
|