Hi Mike,
technically of course correct, but still faster ***in SQL*** than eval() or getpem(),
as it is expanded only once per SQL statement.
If the SQL statement is so long that marcoexpansion matters there are probably other issues.
As long as the SQL is not run in a tight loop,
doing that for perf reasons is premature optimization IMO.
As a matter of personal preference it is more readable,
whereas sometimes I prefer to tweak makros in the debugger.
regards
thomas
>
>I tend to construct SQL using TEXT...ENDTEXT. If you're going to use & to 'expand' the fieldname, you may require many in larger SQL. & is slow. TEXT...ENDTEXT lets you do a lot of expanding without a lot of programming and you only use the & once.
>
>
TEXT TO lcCmd TEXTMERGE NOSHOW
>Select code, department, month1 as <<"_"+dtos(DATE()) >> ;
> from File1;
>into cursor file2
>ENDTEXT
>&lcCmd
>
>BROWSE NORMAL