On Fri, Nov 16, 2007 at 05:43:44PM -0500, Tom Hart wrote: > I've been doing some googling on sql aliases (my sql knowledge is far > from impressive) and it appears that column aliases can be great for > displaying different column names in your output. However I was unable > to find any information regarding using column aliases as variables, > like in the code above. I'm not sure why this works in access, but does > postgreSQL support using a column alias like a variable within the query > that the alias was defined in? IIRC this is not mentioned in the SQL standard. Not sure why, maybe the theory is that all output columns are calculated simultenously which can't be true if they refer to eachother. Have a nice day, -- Martijn van Oosterhout <kleptog@xxxxxxxxx> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution inevitable. > -- John F Kennedy
Attachment:
signature.asc
Description: Digital signature