Subject RE: [firebird-support] Re: Insert Trigger which makes an Update if pk allready there possible?
Author Rick DeBay
Has anyone compared this method with updating, checking the update
count, and doing an insert if it was zero?
Is there any performance/stability/elegance differences?

-----Original Message-----
From: Martijn Tonies [mailto:m.tonies@...]
Sent: Friday, August 20, 2004 2:47 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Re: Insert Trigger which makes an Update
if pk allready there possible?

Hi,

> Wouldn't it be better to say:
>
> begin
> insert ....
> when somethinggoeswrong
> begin
> update ...
> end
> end

This is exactly how Database Workbench creates an
INSERT/UPDATE procedure if you right-click on a
table and select "Create SUID Procedures" ;-)

Isn't that convenient.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS
SQL
Server.
Upscene Productions
http://www.upscene.com





Yahoo! Groups Links