RE: Help with Search -> Update ELSE INSERT

RE: Help with Search -> Update ELSE INSERT

 

  

Try something like this in your cursor

Select rowid
Into uniqueid
From XYZ
Where ABC = 104440
AND TITLE like 'test%'

IF uniqueid = NULL THEN
Do your insert

Paul Blosser
System Developer
Abanco Int'l, LLC.
847-227-2301x2421
-----Original Message-----
From: Dean Lloyd
[mailto:oracledba-ezmlmshield-x19197109.[Email address protected]
Sent: Tuesday, April 03, 2007 7:30 PM
To: LazyDBA Discussion
Subject: Help with Search -> Update ELSE INSERT


Hi Gurus,

I am wondering if anyone could please help out with some ideas on how I
might accomplish this task:

1. Search for record

Select * from XYZ where ABC = 104440 AND TITLE like 'test'

2. If there is a row from the above select statement then find the
'UNIQUEID' for this row

END

OTHERWISE IF NO ROW IS FOUND

EXECUTE "DIFFERENT INSERT"

Any advise much appreciated!

Cheers,


Alphawest Disclaimer

If this communication is not intended for you and you are not an
authorised
recipient of this email you are prohibited by law from dealing with or
relying on the email or any file attachments. This prohibition includes
reading, printing, copying, re-transmitting, disseminating, storing or
in
any other way dealing or acting in reliance on the information.
If you have received this email in error, we request you contact
Alphawest
immediately by returning the email to [Email address protected] and
destroy the original. This email is confidential and may contain
privileged
client information. Alphawest has taken reasonable steps to ensure the
accuracy and integrity of all its communications, including electronic
communications, but accepts no liability for materials transmitted.
Alphawest collects, uses and stores information regarding its customers
from time to time in accordance with its privacy policy located on
www.alphawest.com.au


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



Oracle LazyDBA home page