Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Aliasing Field Names
Message
From
24/06/1998 17:58:19
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
22/06/1998 11:38:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00110554
Message ID:
00111390
Views:
31
>>If I have a remote table with a field name of 1st2ndDeathBenefit. How do I select from that table by aliasing the field name into something fox understands. I have tried:
>>
>>Select "1st2ndDeathbeneft" as DeathBenefit
>>Select '1st2ndDeathbeneft' as DeathBenefit
>>Select (1st2ndDeathbeneft) as DeathBenefit
>>Select Eval(1st2ndDeathbeneft) as DeathBenefit
>>Select &1st2ndDeathbeneft as DeathBenefit
>>
>>all to no avail. Does anyine have any ideas?
>>
>>Ashley
>>AssureSoft Ltd
>well, your first two attempts will create a file with 1 field (DeathBenefit) with '1st2ndDeathbeneft' as the contents.
>
>The third and fourth will send Fox looking for fieldnames of whatever is held in the variable '1st2ndDeathbeneft'.
>
>Have you tried "Select 1st2ndDeathbeneft as DeathBenefit...."?

There's one trick that may work - I've been experimenting with a view which had an Excel sheet as underlying table. The sheet's columns had rather descriptive titles, and the view designer digested all the funny names using syntax like this:

Select table_alias."whatever the expression" as whatever_the_expression, table_alias."3rd expression" as _rd_expression...

so in this case, it would probably work as

Select whateveralias."1st2ndDeathbeneft" as DeathBenefit

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform