>>>When the calculated field length is calculated based on a first matching record and when it is not?
>>
>>God knows, then VFP:)
>>What I learnt (try it once first but) if the query is not based on an expression like alltrim(), pad*() playing with the size or a udf but an expression like nvl(), iif(),evl() ... then VFP uses the field's length.
>>It somehow started to improve after VFP6.
>>Cetin
>
>Thanks a lot, I will keep it in mind.
Just a sample hit me, somehow related, from another forum:
select alltrim(firstName)+' '+alltrim(lastName) as fullName from ...
vs
select firstName-(' '+lastName) as fullName from ...
The latter ensures you'd have a consistent result even if the base structures change.
Cetin