Re: [GENERAL] UPDATE an updatable view

2015-08-28 Thread David Nelson
> Just for the sake of completeness... > > If the value (empname in the above example) can be NULL, the compare does not work, because > > SELECT NULL = NULL > > returns NULL which is treated as FALSE. > > But I am sure you know this :-) > > > HTH, > > Ladislav Lenart > > __

Re: [GENERAL] UPDATE an updatable view

2015-08-28 Thread Igor Neyman
On 27.8.2015 18:35, David Nelson wrote: >>> So in the UPDATE statement, I only provided a value for last_user. >>> But the first test of the trigger function tests for a NULL value of >>> NEW.empname. Since I did not provide one, I was expecting it to be >>> NULL and an exception to be thrown. A

Re: [GENERAL] UPDATE an updatable view

2015-08-28 Thread David Nelson
On Fri, Aug 28, 2015 at 6:39 AM, Ladislav Lenart wrote: > > Hello. > > > On 27.8.2015 18:35, David Nelson wrote: > >>> So in the UPDATE statement, I only provided a value for last_user. But the > >>> first test of the trigger function tests for a NULL value of > >>> NEW.empname. Since > >>> I did

Re: [GENERAL] UPDATE an updatable view

2015-08-28 Thread David Nelson
On Thu, Aug 27, 2015 at 1:21 PM, Jerry Sievers wrote: > > David Nelson writes: > > >>> So in the UPDATE statement, I only provided a value for last_user. But the > >>> first test of the trigger function tests for a NULL value of > >>> NEW.empname. Since > >>> I did not provide one, I was expectin

Re: [GENERAL] UPDATE an updatable view

2015-08-28 Thread Ladislav Lenart
Hello. On 27.8.2015 18:35, David Nelson wrote: >>> So in the UPDATE statement, I only provided a value for last_user. But the >>> first test of the trigger function tests for a NULL value of >>> NEW.empname. Since >>> I did not provide one, I was expecting it to be NULL and an exception to >>> be

Re: [GENERAL] UPDATE an updatable view

2015-08-27 Thread Jerry Sievers
David Nelson writes: >>> So in the UPDATE statement, I only provided a value for last_user. But the >>> first test of the trigger function tests for a NULL value of >>> NEW.empname. Since >>> I did not provide one, I was expecting it to be NULL and an exception to >>> be thrown. Am I just misunde

Re: [GENERAL] UPDATE an updatable view

2015-08-27 Thread David Nelson
>> So in the UPDATE statement, I only provided a value for last_user. But the >> first test of the trigger function tests for a NULL value of >> NEW.empname. Since >> I did not provide one, I was expecting it to be NULL and an exception to >> be thrown. Am I just misunderstanding how things work? I

Re: [GENERAL] UPDATE an updatable view

2015-08-27 Thread Adrian Klaver
On 08/27/2015 09:07 AM, David Nelson wrote: Good morning all, I am creating an updatable view on a set of tables, and just ran into unexpected (or more likely misunderstood) behavior with the UPDATE statement. If an attribute is not explicitly listed in the UPDATE statement, the NEW value appear

[GENERAL] UPDATE an updatable view

2015-08-27 Thread David Nelson
Good morning all, I am creating an updatable view on a set of tables, and just ran into unexpected (or more likely misunderstood) behavior with the UPDATE statement. If an attribute is not explicitly listed in the UPDATE statement, the NEW value appears to be populated with the OLD value. Unless I