Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to change field name in SQL Select
Message
From
20/12/2012 10:14:38
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
20/12/2012 07:10:46
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01560255
Message ID:
01560284
Views:
53
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform