General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>This could be argued either way. It all depends on what you perceive is meant by the "source." That is, the source could be the table, which is the ultimate source, or the source could be the underlying view. If I remember correctly, I think the structure of a resultant cursor of a SELECT statement can be dependent upon the first row of data - at least this is the answer I've been given as to why one shouldn't, for example, include ALLTRIM() expressions in the field list. With that in mind, one might say the underlying views should automatically pull in data if the correct structure is really to be determined for view of the view.
>
Sorry, can't accept this argument. Structure of a resultant cursor shouldn't depend on data in the first or any other row, it should be completely discoverable from structure of base tables and the query itself. Break this rule and, eventually, you'll be unpleasantly surprised. That is exactly why you've been told to avoid using ALLTRIM() in SELECT list.
Though, it should be OK to use ALLTRIM/LTRIM/RTRIM because VFP is smart enough to handle them, but you should really be careful with UDFs and some other functions.
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