>>"Correct" gets the job done. "Efficient" is a different issue.
>>
>>Here's an example:
>>You have a table (Customers) with 1 million rows. There is an index (FullName) on UPPER(LastName + FirstName). What is the "correct" way of finding a particular name? Is it:
>>
>>a) LOCATE UPPER(m.LastName + m.FirstName)?
>>b) SET ORDER TO TAG FullName then SEEK UPPER(m.LastName + m.FirstName)?
>>c) SEEK(UPPER(m.LastName + m.FirstName), "Customers", "FullName")?
>>d) SELECT * FROM Customers WHERE UPPER(LastName + FirstName) = UPPER(m.LastName + m.FirstName)?
>>
>>Answer is:
>>All of the above are "correct", but some are more efficient than others.
>>
>
>Then, among the 4 solutions, what is the "correct" choice ?
>
All are "correct" as they will all get the needed results.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer