Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> SQL question
Group,
Could someone PLEASE explain why this SQL is not returning the correct rows.
pcs_trans_prod is a dblink and a synonym to a remote database but do not
think this should matter.
Thanks in advance !!!!!!!!!!!!!!!!!!!!!!!!!! 1 SELECT pt.UPC 2 FROM pcs_trans_prod pt 3 WHERE pt.DODAAC = 'WGR' 4 AND pt.upc IN (SELECT DISTINCT '00'||substr(item_upc, 1,11) FROM completed_vcms 5* WHERE item_upc = '300318623530')webdev9:avcm_user> /
UPC
1 SELECT pt.UPC
2 FROM pcs_trans_prod pt 3 WHERE pt.DODAAC = 'WGR' 4 AND pt.upc IN (SELECT DISTINCT '00'||substr(item_upc, 1,11) FROM completed_vcms 5* WHERE item_upc = '323900004930')webdev9:avcm_user> /
UPC
1 SELECT pt.DODAAC, UPC
2 FROM pcs_trans_prod pt
3 WHERE pt.DODAAC = 'WGR'
4* AND SUBSTR(upc,3) = '323900004930'
DEV9:avcm_user> /
no rows selected
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Rusnak, George A. (SEC-Lee) CTR
INET: george.rusnak_at_deca.mil
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed May 07 2003 - 16:24:50 CDT