Re: Order of evaluation of functions in records & somewhat recursive function

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
.



Relevant Pages

  • Re: What is the technique to supply a list of values to a where clause?
    ... the where clause has a "column in list" clause. ... When I try to run the code, DBI returns an error saying that the value ... execute with 10 variables when 2 were needed. ... element in the ArrayTupleStatus and in some cases it does not help ...
    (perl.dbi.users)
  • Re: user permissions
    ... I would like to add some comments regarding 'EXECUTE AS' clause in SQL ... Server 2005 as a complement of Rick's response. ... Microsoft Online Community Support ...
    (microsoft.public.sqlserver.security)
  • Re: Do all the legs of an "OR" with null comparisons get executed?
    ... I did MMDDOB=1231, whenever MMDDOB was NULL the row would be filtered ... The WHERE clause is not working the way you expect, ... Placing as Oracle would evaluate the WHERE clause: ... going to execute something that reads ...
    (comp.databases.oracle.server)
  • What is the technique to supply a list of values to a where clause?
    ... I am working on a quick tool to update some records in an oracle ... database. ... the where clause has a "column in list" clause. ... execute with 10 variables when 2 were needed. ...
    (perl.dbi.users)
  • Re: for what are for/while else clauses
    ... print avalue, ... When somebody else "will the else clause execute", ... It seems misleading to me to focus on the controlling condition, i.e., ...
    (comp.lang.python)