Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Can we join the result of One CURSOR with other DB2 Table.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Can we join the result of One CURSOR with other DB2 Table.
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Handling result sets in the calling N... Rusikesh DB2 7 Fri Apr 13, 2018 12:25 am
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts COBOL declaration for table Poha Eater DB2 3 Mon Feb 26, 2018 6:58 pm
No new posts load and delete table through JCL wit... ram_vizag JCL & VSAM 9 Thu Feb 01, 2018 12:47 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us