5 pts.
 DB2 Select on a large number of rows/
DB2, JCL, SQL
I have to run a DB2 against a number of table for example tableA, tableB and select a number of fields from the table. However, I have to run the selection against 5,000 records that. I want to know if using SQL embedded in a JCL, if I could plug in a file with the records I want to select for example MyFile: Contains the records I want to select SELECT A.FELD1, A.FIELD2, B.FIELD1, B.FIELD2 FROM tableA A, tableB B where A.acc = b.acc AND a.acc in ( <myFile >)

Software/Hardware used:
ASKED: August 22, 2008  3:52 PM
UPDATED: September 22, 2009  2:11 PM

Answer Wiki:
you say "using SQL embedded in a JCL" which leads me to think something like DSNTEP2. So the answer is that I am unaware of anyway to do this with a file. HOWEVER, you could use a DB2 table. SELECT A.FELD1, A.FIELD2, B.FIELD1, B.FIELD2 FROM tableA A, tableB B where A.acc = b.acc AND a.acc in ( select column1 from my_table) <--- Steve
Last Wiki Answer Submitted:  September 22, 2009  2:11 pm  by  Meandyou   5,205 pts.
All Answer Wiki Contributors:  Meandyou   5,205 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _