Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
10 types of people
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00836301
Message ID:
00837495
Views:
43
>George>>>But now that you bring it to *our* attention, in sql-selects I use single-letter aliases a lot and it has never harmed me in any way. The sql-select code is always in its entirety visible on the screen and the interpretation is easy enough. Moreover, a letter is neutral and allows changing the name of the used table more easily; in other cases the name of the used table is even unknown when programming.
>>>>
>>>>We've had some discussions on standards recently, as you probably know. I think that your statement is debateable. Perhaps this reaction is the offset for that debate. :)
>>>
>>>Peter;
>>>
>>>This may never happened to you but I know of several people who used A-J for an alias and it caused problems. This is something that goes back to dBase and could still be an issue. I have not tested it for some time but I never use a one letter alias - it is force of habit.
>>>
>>Tom,
>>
>>While using a single letter alias may not be a problem with either an SQL SP or when using SPT, using it in Fox is a terrible idea. This practice ties the code to a specific work area. Further, if a table is already in use in that work area, it is automatically closed.
>>
>>Of course, you know all this.:-)
>
>Hi Tom and George,
>
>The letter A was used in a sql-select. Let me PINS (reverse of SNIP) it here once more:
>
select distinct ttod( a.from ) from ( lcFile ) a into array laTmp
>Tamar was referring to this usage. For the sake of the eventual discussion, let's limit the debate to whether or not it's 'allowed' (according to the idea of 'superb standards') in sql-select statements. The arguments you both gave against usage are not valid for usage in sql-selects, IMO.

A lot of times I'll write VFP SQL-Selects in the command window for testing. By using the actual alias, rather than assigning one in the from clause, it allows me to take advantage of Intellisense. All I have to do then is copy and paste once I've proven the SELECT does what I want it to do.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform