Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution and evaluate - which to use
Message
From
19/07/2007 10:52:52
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
 
To
19/07/2007 10:46:55
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01241954
Message ID:
01241963
Views:
38
Hi Beth,

try this (not tested)
text to lcSql textmerge noconsole 
SELECT <<latmp[1]>> as <<lcnewfield>> FROM <<lcoldfile>>
   INTO TABLE <<lcnewfile>> DATABASE <<lcTAbleDbc>>
endtext 
&lcSql 
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform