Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> how to modify query

how to modify query

From: Harvinder Singh <Harvinder.Singh_at_MetraTech.com>
Date: Wed, 04 Dec 2002 11:04:53 -0800
Message-ID: <F001.00512606.20021204110453@fatcity.com>


Hi,  

Following code works in sql server but IF NOT EXISTS dosn't work in oracle how can we modify this code so that it should work on both sql server and oracle

 if not exists (
select
col1
from
t_suspended_txn
where
col2 ='A'
begin
insert into t_suspended_txn
select 'A' , 'B'
end  

Thanks
--Harvinder

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Harvinder Singh
  INET: Harvinder.Singh_at_MetraTech.com

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 Dec 04 2002 - 13:04:53 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US