IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can we join the result of One CURSOR with other DB2 Table.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramfrom84

New User


Joined: 23 Aug 2006
Posts: 93
Location: chennai

PostPosted: Thu Jun 28, 2007 7:14 pm
Reply with quote

Hi ,
Following Db2 tables with records...

Table A has 1,00,000 records,
Table B has 1,00,000 records,
Table C has 1,00,000 records,

According to my Condition for Table A will fetch only 100 records after processing ,

method 1: lot of scanning ....

Cursor A:
join Table A, Table B and Table C
Get the result .

method 2 : (Is possible)

Cursor A :
table A with Some Condition

result: 1000 recors.

Cursor B:
join Cursor A with Table B, Table C

to reduce the scanning of all records from Table A , Only 1000 records will be scanned.

It is possible , if it how can we do this?


bye..
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Fri Jun 29, 2007 5:18 am
Reply with quote

Please post your existing query and information about available indexes.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top