Subject | Re: [ib-support] Re: Changing Insert to Update. |
---|---|
Author | John Peterson |
Post date | 2002-02-11T02:08:30Z |
thanks Marco,
That is pretty much the response I expected. Maybe I am trying to push too
much back to the server.
John
That is pretty much the response I expected. Maybe I am trying to push too
much back to the server.
John
----- Original Message -----
From: "mmenaz" <mmenaz@...>
To: <ib-support@yahoogroups.com>
Sent: Monday, February 11, 2002 10:34 AM
Subject: [ib-support] Re: Changing Insert to Update.
> I think the only way is doing this using a stored procedure. Pass all the
fields you want to insert/update as input parameter of the SP. Inside the SP
check the existence of the row, then if false insert, overwise update. I
don't know if it's faster try a insert and trap the exception (I never tried
that).
> Wouldn't be better have something like (client side): after entering the
key fields, have a search. If found, show and edit, if not insert (ok, some
code to write here ;)). Just an idea.
> Regards
> Marco Menardi
>
> --- In ib-support@y..., "John Peterson" <jcp@i...> wrote:
> > Hi All,
> > I have a table with a unique constraint. Is there any way in a trigger
on
> > the table to convert an insert into an Update if the key value already
> > exists?
> > The idea is to update (the possibly changed) non unique columns, while
> > hiding this fact from the (possibly ISQL) user, and keep the client
simple,
> > and rules in the server.
> >
> > TIA
> > John
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>