In another tool, I was able to use a substitution variable to replace specific elements in an SQL statement. For now I need to hard code the data library as the SP will be called without a library list. Is this available and where do I find the list? In this case, I need library group 2 from the setup definitions. Then I would have PDQMST001 for ITG and ABCMST001 for QUA and PDN.
SELECT VSTATE AS State, ZIP, CITY, ad.VENDR, SEQN,VENDORNAME
FROM LIBRARY1.FILE2PF AD JOIN LIBRARY1.FILE1PF NM ON (ad.VENDR = Vendorno)
WHERE (wk_State = ' ' or wk_State = vstate)
AND (wk_City = ' ' or locate(wk_City,upper(trim(CITY))) <> 0)
AND (wk_Name = ' ' or locate(wk_Name,upper(trim(VName))) <> 0)
ORDER BY state, zip;
FROM LIBRARY1.FILE2PF AD JOIN LIBRARY.FILE1PF NM ON (ad.VENDR = Vendorno) WHERE (wk_State = ' ' or wk_State = vstate) AND (wk_City = ' ' or locate(wk_City,upper(trim(CITY))) <> 0) AND (wk_Name = ' ' or locate(wk_Name,upper(trim(VName))) <> 0) ORDER BY state, zip;
------------------------------
David Taylor
Senior Developer
Range Resources Corporation
Fort Worth TX US
------------------------------