473,387 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Short circuit boolean eval in trigger WHEN clause?

G'day

I have a before-update trigger a bit like
....
REFERENCING OLD AS O NEW AS N
....
WHEN (N.STATUS 0
AND EXISTS (SELECT EXTREF FROM MY.ET
WHERE EXTREF=N.REF OR EXTREF=O.REF))
Updates should mostly fail the N.STATUS>0 clause, so I don't really want
to do the EXISTS for every update.

Will this perform short circuit evaluation, i.e. if N.STATUS is zero,
will it still evaluate EXISTS(select..) ?

Or should I move the EXISTS into an IF inside the trigger action?

--Greg Nash
Sep 3 '07 #1
0 1800

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: webposter | last post by:
Hi, I am looking for information on a data structure (and associated algorithm) to do short-circuit evaluation of boolean expressions and haven't found a single one even after googing for two...
5
by: Michael Jørgensen | last post by:
Hi there, Is there any difference between bool success = SomeFunctionReturningFalse(); success &= SomeOtherFunction(); and bool success = SomeFunctionReturningFalse();
5
by: Phil Jones | last post by:
I'm just (as a matter of course) using AndAlso and OrElse statements to short circuit checking, even for nominal things like Boolean comparisons. I'm wondering, is that a good thing to do (for...
7
by: Daron | last post by:
In my SQL I have a column that returns a boolean value (-1 or 0), no problem. I need to be able to only see the records that return a 0 (False). I can sort and bring these to the top. When I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.