Posted: Wed Dec 07, 2005 7:53 am Post subject: switching tables using esql
Apprentice
Joined: 24 May 2004 Posts: 43
Hi,
Just curious to find out if we can switch across tables in a single query statement in a Compute Node.
example:
Set Environemnt.Variables.getv_id=THE(......) the sql statement being
Code:
SELECT MIN(A.V_ID) FROM schemaA.tableXX N
WHERE N.PART_NUMBER = '9999'
AND N.VENDOR_ID = 'ABC9999'
exception
when no_data_found then
SELECT MIN(A.V_ID) FROM schemaA.tableYY M
WHERE M.PART_NUMBER = '9999'
AND M.VENDOR_ID = 'ABC9999'
The alternate method would ofcourse be to catch it as an exception using the SQLCODE value.
FYI "If PL/SQL raises the NO_DATA_FOUND exception, then SQLCODE returns a value of +100"
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum