Subject [Ticket #70] [firebird-support] Detecting default values
Author Desarrollo
This is a notification from the Help Desk.




On Mar 07, 2014 @ 03:25 pm, ismael@... wrote:
In the trigger:

if (new.myfield is null) then

Best Regards
=========
|| ISMAEL ||
=========


==Ticket History==

On Mar 07, 2014 @ 03:25 pm, chamberlin.doug@... wrote:
No Comment.

------
On Mar 07, 2014 @ 03:25 pm, dev@... wrote:
Hi,

I have a table with a field for which i need a default value. My problem
is the default value can change at any time. So the solution I found is
to use a "before insert" trigger.

But now, i'm facing a new challenge: how to detect if the null status I
received in new.myfield is because the field was not in the insert
statement or because the insert statement set it to null ?

well, from
insert into mytable (field1) values (:field1)
or from
insert into mytable (field1, myfield) values (:field1, null)

------
This is an automated response. Your issue has been noted. We'll be in touch soon.



Please reply to this email or visit the URL below with any additional details.

http://DANTOIN:9675/portal/view-help-request/70




[Non-text portions of this message have been removed]