J E
Member since Sep 19, 2014
- Profile: /members/12286-j-e.htm
- Comments: 3
Recent Blog Comments By J E
-
You Can Reference Your Derived SELECT Columns In Your ORDER BY Clause In SQL
Posted on Sep 22, 2014 at 10:24 AM
@Ben, In regards to temp tables and connection pooling -- with both DB2 and PostgreSQL on session based temp tables ( they ones most people think of ) -- as CF will try to round-robin the connection pool to the general extent a second cf query will often fail if you refer to the temp table ( not a... read more »
-
You Can Reference Your Derived SELECT Columns In Your ORDER BY Clause In SQL
Posted on Sep 19, 2014 at 6:09 PM
@Ben -- Correct - Literals in the SELECT clause are treated as such -- I am not aware of any database that claims to be SQL compliant that would not follw that behaviour. You should consider giving a few or the scaler functions some air time -- my current favorite COALESCE(col1,col2,col3,...). It r... read more »
-
You Can Reference Your Derived SELECT Columns In Your ORDER BY Clause In SQL
Posted on Sep 19, 2014 at 3:56 PM
Note that not all SQL platforms support using the column alias in the ORDER BY -- E.G. -- PostgreSQL does!, DB2 does not :( However nearly ALL allow you to refer to the column ordinal position instead. So you example could also be expressed as: ORDER BY 3 DESC f.name ASC "3" be... read more »