Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Network:
Windows 2008 Server
>I don't see why do you have to keep m alias in the first place.
It's an inherited app and it will take time to undo this mess everywhere M alias is used. Just try to keep track of 13 different single letter aliases in a query. A is for invoice and b is for customer and c is for something and so on. Sheesh! How about Inv and Cus and Som as abbreviations. First time I've ever seen m.fieldname not mean a memvar!
>
>>
>>Here's an interesting problem I found in an application I inherited.
>>
>>I strongly advise against single letter aliases in SQL and in VFP from the perspective of readability and maintainability. Be especially careful with M as an alias in VFP SQL.
>>
>>create table tmpinvoices free (field1 c(10))
>>local ltDatetime
>>ltDatetime = datetime()
>>select m.field1,m.ltDatetime as tdatetime from tmpinvoices m into cursor c_Result
>>
>>You will get an error that column ltDatetime is not found. OK. So drop the m. from ltDatetime, but now you are slowing your query - admittedly very little, but I don't like doing things half-fast. ;)
>>
>>I tried to add this to the mdot topic on the wiki, but my changes are not being saved.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only