[GENERAL] sql or pgsql question, accessing a created value

2011-07-11 Thread David Salisbury
Hope someone's out there for this one. Basically I'm creating a summary table of many underlying tables in one select statement ( though that may have to change ). My problem can be shown in this example.. select my_function( timeofmeasurement, longitude ) as solarnoon, extract(epoch

Re: [GENERAL] sql or pgsql question, accessing a created value

2011-07-11 Thread David Johnston
select my_function( timeofmeasurement, longitude ) as solarnoon, extract(epoch from ( timeofmeasurement - solarnoon ) as solardiff ( case when solardiff 3600 then 'Y' else 'N' end ) as within_solar_hour from my_table; But I get an error along the lines of ERROR: column

Re: [GENERAL] sql or pgsql question, accessing a created value

2011-07-11 Thread Raymond O'Donnell
On 11/07/2011 20:19, David Salisbury wrote: Hope someone's out there for this one. Basically I'm creating a summary table of many underlying tables in one select statement ( though that may have to change ). My problem can be shown in this example.. select my_function( timeofmeasurement,