Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 Oracle PL/SQL: IN Jump to:  
Category: >> Oracle PL/SQL >> IN Bookmark and Share

<< lastnext >>

Snippet Name: IN

Description: Examples of the use of IN in a SQL statement

Comment: (none)

Language:
Highlight Mode: PLSQL
Last Modified: March 01st, 2009

INSERT INTO temp_rep2_bucket
(SELECT account_id FROM temp_rep_bucket
WHERE LTRIM(account_id,' ') IN (SELECT customer_number FROM ra_customers)
AND ROWID = ROWID
AND ROWNUM < 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 (SELECT LTRIM(account_id,' ') FROM temp_rep_bucket)
AND a.customer_number = (SELECT LTRIM(account_id,' ') FROM temp_rep_bucket)
AND a.primary_salesrep_id != b.people_id
/
 


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


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.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 200 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?