|
|
| Author |
Message |
vijendra.23
New User
Joined: 06 Apr 2007 Posts: 3 Location: bangalore
|
|
|
|
Hi all ,
can anyone suggest me regarding below condition:
There are two Table - A and Table -B. Now i want to take first row of table A and comes to table B ,Read all records from Table B then at the end of B, i want to go back to table A and read second record of Table A then all record of B like wise till end of table A. |
|
| Back to top |
|
 |
References
|
Posted: Sat Aug 25, 2007 1:23 pm Post subject: Re: DB2 Cursor, Reading two tables record by record |
 |
|
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 7517 Location: 221 B Baker St
|
|
|
|
Hello,
Why would you want to generate a cartesian product?
What you want to do is prevented whenever possible.
Why do you need to read table 2 over and over? |
|
| Back to top |
|
 |
stodolas
Senior Member
Joined: 13 Jun 2007 Posts: 646 Location: Wisconsin
|
|
|
|
| A proper join statement is probably more correct. Don't treat the database tables like files. |
|
| Back to top |
|
 |
|
|