Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Define fieldname
Message
 
To
14/04/2006 17:30:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01113784
Message ID:
01113806
Views:
15
:o)

>Works for me too once I set the variable to a legal fieldname.
>_2007 vs 2007
>Thanks
>
>:)
>
>>>SQL SELECT allows for creation of new field names using AS clause, as in
>>>
>>>select fieldname as newfieldname
>>>
>>>This works easily when the newfieldname is know when the code is written, but how can we cause the newfieldname to be a variable as in
>>>
>>>newfieldname = "newname"
>>>select fieldname into &newfieldname
>>>
>>>All my attempts at macro substitution or other techniques have failed.
>>>Is my objective possible?
>>>
>>>Thanks for any help.
>>>
>>>- Don
>>
>>This works for me:
>>
>>newFldName = [NewFieldName]
>>SELECT FieldName AS &newFldName FROM ... INTO ...
>>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform