>>>Hi All,
>>>
>>> I am trying to set up a select statement, I do not know the field name ahead of time. I do an AFIELDS() to get the field name, since there is only one field in the table. I need to change the field name to another name which I get before this select statement. I am thinks this way:
>>>
>>>SELECT EVALUATE(latmp[1]) as &lcnewfield. FROM &lcoldfile. ;
>>> INTO TABLE lcnewfile DATABASE &lcTAbleDbc.
>>>
>>>
>>>Am I using the macro substitution too much? Can I do this easier? or nicer?
>>>
>>>TIA
>>>Beth
>>
>>I agree with the others, use the TEXTMERGE approuch. But not the macro substitution, use the ExecScript() function. It appears to be faster and clear code.
>
>INteresting - what parameters did you play with in your testing and what was the speed difference ?
>
>curious
>
>thomas
This from my experience and observation when I was writing test cases for the VFP team back in 2002. I no longer have access to those statistics. But I do remimber the performance tests performing a larger loop (10000+) interations using Macros, Evaluate, and ExecScript.
I retrack my statement. I did the tests and Yes in simple statements, Macros are faster then ExecScript. But I still believe Evaluate() will out perform Macros.
Greg Reichert