Re: Order of evaluation of functions in records & somewhat recursive function
- From: John Spencer <spencer@xxxxxxxxxx>
- Date: Wed, 24 Sep 2008 20:45:06 -0400
I am not sure if the evaluation is in this order, but I think it MAY BE.
Select the Tables
Execute the WHERE Clause
Execute the ORDER BY Clause
Return specific fields requested in Order
However, if you are using the results of the vbaFun to order by then the vbaFun obviously has to run before the ORDER by clause can execute. So the whole order is not fixed, but is dependent on other factors.
HOWEVER, you might be able to use something like the following if the values of F are unique.
SELECT F, vbaFun(DMax("F","T","F<" & T.F))
FROM T
ORDER BY F
'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
brwn.fred@xxxxxxxxx wrote:
Hi,.
Is the order of evaluation of records defined in a Jet SQL query. For
instance,
lets say I have a table T with field F. If I have a query:
SELECT F, vbaFun([F]) AS exp
FROM T
ORDER BY F;
will vbaFun() be executed on the Fs according to the sorting order?
If so, then could I add some type of static VBA variable to calculate
a function that depends on the value f on the previous piece of data
and the current data - a partially recursive function?
Thanks,
Fred Brown
- Follow-Ups:
- References:
- Prev by Date: Query Problems
- Next by Date: Re: How do I use an update query to replace "Apt" with "#" ?
- Previous by thread: Order of evaluation of functions in records & somewhat recursive function
- Next by thread: Re: Order of evaluation of functions in records & somewhat recursive function
- Index(es):
Relevant Pages
|