by swd » Mon Oct 26, 2009 10:13 pm
Pebble,
Using SPUFI, you have to add the DB2 QUALIFIER name before the tablename, so it knows which database table to point your SQL statement at. For instance if a Qualifier is called CUSTPLAN and your customer table was CUSTOMER, then you would specify this in the SPUFI.
SELECT * FROM CUSTPLAN.CUSTOMER WHERE BIRTH_DATE = CURRENT DATE;
In a COBOL program with embedded SQL, your SQL would only specify the table CUSTOMER
SELECT * FROM CUSTOMER WHERE BIRTH_DATE = CURRENT DATE;
This is because your program will have a runparm that points to a plan name, which defines what access path your program takes, and so points to the correct database that was specified at BIND time.
I hope this is enough info for you.