Subject RE: [ib-support] help on a stored proc
Author Kaputnik
something like:

IF (EXISTS (SELECT blabla FROM blabla WHERE blabla)) THEN
BEGIN
UDATE.....
END
ELSE
BEGIN
INSERT INTO.....
END

?

Nick Josipovic

CRM Administration
BIT-Institute
Prof. Dr. Franz Steffens
Schloss
68163 Mannheim
Germany
Phone: ++49 621 181-1621
Fax: ++49 621 181-1618
mailto:nick.josipovic@...



> -----Original Message-----
> From: zifnabbe [mailto:zifnabbe@...]
> Sent: Saturday, December 08, 2001 12:56 PM
> To: ib-support@yahoogroups.com
> Subject: [ib-support] help on a stored proc
>
>
> Hi,
>
> In another thread I received the advice of programming something in a
> stored proc. My stored proc is rather limited. Can somebody give me
> some hints? I've searched several groups and faq lists, but can't
> find help, although it should rather be simply, I guess:
>
> I need to store a record into a table, but first before I insert it,
> I've to check if it exists, if it doesn't I've to insert it in the
> table, if it exists I've to update the existing record.
>
> And if possible, Is there a way to get information on which records
> were inserted/updated or failed (because of data not correct?)
>
> Thanks in advance,
>
> Tom.
>
>
>