Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
10 types of people
Message
From
10/10/2003 11:12:03
 
 
To
10/10/2003 10:22:41
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00836301
Message ID:
00837432
Views:
39
>>I did:
>>
select distinct ttod( a.from ) from ( lcFile ) into array laTmp
>>
>>Since the table currently only has values 10-10-2003, this should have given:
>>
laTmp[1]  "10-10-2003"
>>but it gave:
>>
laTmp[1]  "02-02-2003"
>>I did a lot of debugging, couldn't explain what was happening and we thought with a laughter "well, maybe it's an easter egg, translating bin 10 to dec 02". :)
>>
>>In fact, what was the cause?! I forgot to specify the a behind lcFile. And there was a similar table open in workarea a! The record over there indeed had 02-02-2003.
>>
>
>Just want to point out that using A as an alias is generally not a good idea. Much better to use the actual alias.

Hi Tamar,

Well, I was not really telling this story to start a discussion on whether or not to use A as an alias in a sql-select. :)

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. :)
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform