How does progress handle this find first statement??

DGARD

New Member
Hi

I was looking through a program looking for a bugg when I stumbled on a find first statment that seemed "strang":

Find First T-1 Where T2.Field1 = T1.Field1
T2.Field2 = T1.Field2 And
T2.Field3 = T1.Field3 no-lock no-error.

I would have written it like:

Find First T-1 Where T1.Field1 = T2.Field1
T1.Field2 = T2.Field2 And
T1.Field3 = T2.Field3 no-lock no-error.


Does progress handle these two statments differently??
 

jamesmc

Member
I dont think that this really matters. AFAIK each expression within the find must return a true value for a record to be classed as falling into the selection criteria, for example:

Code:
find first t-1 where t-2.field1 = t-1.field1 (if both fields match you get a true)
                 and t-1.field2 = t-2.field2 (again, if both match you get a true)
                 NO-LOCK no-error.

Only if you get a true value for each of the field checks does progress class that record as a valid find.

Anyone correct me if I am wrong.

James.
 

Rutger

New Member
I'm not quite sure but doesn't progress change both queries into the same query during compile time?



jamesmc said:
I dont think that this really matters. AFAIK each expression within the find must return a true value for a record to be classed as falling into the selection criteria, for example:

Code:
find first t-1 where t-2.field1 = t-1.field1 (if both fields match you get a true)
and t-1.field2 = t-2.field2 (again, if both match you get a true)
NO-LOCK no-error.

Only if you get a true value for each of the field checks does progress class that record as a valid find.

Anyone correct me if I am wrong.

James.
 
Top