Description: Examples of the use of IN in a SQL statement
Comment: (none)
Language: Highlight Mode: PLSQL Last Modified: March 01st, 2009
INSERTINTO temp_rep2_bucket
(SELECT account_id FROM temp_rep_bucket
WHERELTRIM(account_id,' ')IN(SELECT customer_number FROM ra_customers)ANDROWID=ROWIDANDROWNUM<30)/SELECT ORIG_SYSTEM_CUSTOMER_REF, ORIG_SYSTEM_BILL_ADDRESS_ID,ORIG_SYSTEM_SHIP_ADDRESS_ID
FROM ar_invoice_interface_headers
WHERE ORIG_SYSTEM_CUSTOMER_REF IN(SELECT ORIG_SYSTEM_CUSTOMER_REF FROM ar9.ar_invoice_interface_headers)/SELECT a.customer_number, a.primary_salesrep_id, b.account_id, b.people_id
FROM ra_customers a, temp_rep_bucket b
WHERE a.customer_number IN(SELECTLTRIM(account_id,' ')FROM temp_rep_bucket)AND a.customer_number =(SELECTLTRIM(account_id,' ')FROM temp_rep_bucket)AND a.primary_salesrep_id != b.people_id
/
SQL University.net courses meet the most demanding needs of the business world for advanced education
in a cost-effective manner. SQL University.net courses are available immediately for IT professionals
and can be taken without disruption of your workplace schedule or processes.
Compared to traditional travel-based training, SQL University.net saves time and valuable corporate
resources, allowing companies to do more with less. That's our mission, and that's what we deliver.