Subject | Re: help on a stored proc |
---|---|
Author | zifnabbe |
Post date | 2001-12-08T13:10:26Z |
Thanks for the reply, I didn't knew about the EXISTS function and
that I was looking for. So the Exists funtion returns True when the
select statement returns 1 or more rows?
Tom.
that I was looking for. So the Exists funtion returns True when the
select statement returns 1 or more rows?
Tom.
> something like:in a
>
> 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@b...
>
>
>
> > -----Original Message-----
> > From: zifnabbe [mailto:zifnabbe@u...]
> > Sent: Saturday, December 08, 2001 12:56 PM
> > To: ib-support@y...
> > Subject: [ib-support] help on a stored proc
> >
> >
> > Hi,
> >
> > In another thread I received the advice of programming something
> > stored proc. My stored proc is rather limited. Can somebody giveme
> > some hints? I've searched several groups and faq lists, but can'tit,
> > find help, although it should rather be simply, I guess:
> >
> > I need to store a record into a table, but first before I insert
> > I've to check if it exists, if it doesn't I've to insert it inthe
> > table, if it exists I've to update the existing record.records
> >
> > And if possible, Is there a way to get information on which
> > were inserted/updated or failed (because of data not correct?)
> >
> > Thanks in advance,
> >
> > Tom.
> >
> >
> >