Sk Balu

Greenhorn
+ Follow
since Jun 12, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sk Balu

Jeanne Boyarsky wrote:With Java it's easier. Do the "parent" query and then call the same function with each result until no results are left. Just like any other Java recursion. You might try posting what you get stuck on.



I am trying to write Java method but If this exists already then I can re-use it and save time.

Jeanne Boyarsky wrote:Take a look at common table expressions. I'm not sure if they are database specific, but I know postgres and SQL server both have them.



Thanks Jeanne. I looked at common table expressions but I am looking for Java recursive programming solution to make it database independant.
Anybody has a Java/JDBC example method to execute recursive SQL queries and print results? The method has to work for any number of queries and levels and the first query passes the parameter to the second query.

Thanks in advance.