>Excellent, thanks for your help.
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