|
Home > Archive > SQL Anywhere database > June 2005 > "Referencing New as" buffer question...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
"Referencing New as" buffer question...
|
|
| Jeff Gibson 2005-06-20, 1:23 pm |
| I'm curious about an issue I'm running into in a set of BEFORE level
triggers.
Should setting a value on a column in the first trigger, be available to you
in the second trigger through its "Referencing New" buffer?
We are creating a pk in the first trigger, and I am trying to reference that
column value in the when clause of the second trigger. The trigger is
acting as if the value doesn't exist in the buffer. However when I set up a
second trigger to print the value to the console, it prints just fine. Can
anyone tell me what standard behavior should be when it comes to referencing
column values from the "Referencing New as" buffer in before level insert
triggers?
We are currently running ASA 6.0.4 Build 3799.
Any thoughts would be greatly appreciated.
TIA
Jeff Gibson
Intercept Solutions
Nashville, TN
| |
| Jeff Gibson 2005-06-20, 8:23 pm |
| Nevermind.
Note to everyone. When you are trying to grab the "content of a column" out
of a row that is going to be your parent row to the row that is currently
being inserted in a before insert trigger. DO NOT TRY AND JOIN TO IT IN
YOUR WHERE CLAUSE!! IT'S NOT THERE YET!!!
;-)
Fixed and working now.
Jeff Gibson
Intercept Solutions
Nashville, TN
"Jeff Gibson" < jgibson@interceptsol
utions.com> wrote in message
news:42b70e6c$1@foru
ms-2-dub...
> I'm curious about an issue I'm running into in a set of BEFORE level
> triggers.
>
> Should setting a value on a column in the first trigger, be available to
> you in the second trigger through its "Referencing New" buffer?
>
> We are creating a pk in the first trigger, and I am trying to reference
> that column value in the when clause of the second trigger. The trigger
> is acting as if the value doesn't exist in the buffer. However when I set
> up a second trigger to print the value to the console, it prints just
> fine. Can anyone tell me what standard behavior should be when it comes
> to referencing column values from the "Referencing New as" buffer in
> before level insert triggers?
>
> We are currently running ASA 6.0.4 Build 3799.
>
> Any thoughts would be greatly appreciated.
>
> TIA
>
> Jeff Gibson
> Intercept Solutions
> Nashville, TN
| |
| Erik Anderson 2005-06-20, 8:23 pm |
| Random comment here, this rule can get a little bit more complicated than
how you state...
I was working on a BEFORE DELETE trigger a couple years back and discovered
that while the parent row (that was also being deleted) was still there (it
was, after all, a before delete trigger), any grandparent rows (that were
also being deleted) had already disappeared by the time the trigger fired.
"Jeff Gibson" < jgibson@interceptsol
utions.com> wrote in message
news:42b724c7$1@foru
ms-2-dub...
> Nevermind.
>
> Note to everyone. When you are trying to grab the "content of a column"
> out of a row that is going to be your parent row to the row that is
> currently being inserted in a before insert trigger. DO NOT TRY AND JOIN
> TO IT IN YOUR WHERE CLAUSE!! IT'S NOT THERE YET!!!
>
> ;-)
>
> Fixed and working now.
>
> Jeff Gibson
> Intercept Solutions
> Nashville, TN
>
> "Jeff Gibson" < jgibson@interceptsol
utions.com> wrote in message
> news:42b70e6c$1@foru
ms-2-dub...
>
>
|
|
|
|
|