Thread: Problem using CASTed timestamp column
Hi all, I've got an odd problem. I've got a column with a non-standard date/time in it that I carve up and re-cast as a timestamp. This works fine. Now though, I am trying to check/restrict my results to dates before now() and it's telling me that the columns doesn't exist. http://pastebin.com/sExiBynp Any hints on what I am doing wrong? Thanks! -- Digimer E-Mail: digimer@alteeve.com AN!Whitepapers: http://alteeve.com Node Assassin: http://nodeassassin.org
On Thu, Nov 11, 2010 at 2:26 PM, Digimer <linux@alteeve.com> wrote: > http://pastebin.com/sExiBynp > Any hints on what I am doing wrong? You can't refer to a column alias name in the order by clause unfortunately. You'll need to either nest this query in another query to use the alias name, or you have to use a physical column name or an expression. -- Regards, Richard Broersma Jr. Visit the Los Angeles PostgreSQL Users Group (LAPUG) http://pugs.postgresql.org/lapug