Re: [firebird-support] Re: Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause)

2015-05-12 Thread sboyd...@gmail.com [firebird-support]
Assuming OPS_ONBOARD_TIME, OPS_DELIVERED_TIME and OPS_APPT_LOW are all DATE type,does this solve that problem? COALESCE(OPS_ONBOARD_TIME, OPS_DELIVERED_TIME, OPS_APPT_LOW, CURRENT_DATE) Since they are all TIMESTAMPS, that didn't fix the problem but CURRENT_TIMESTAMP did. Thanks.

Re: [firebird-support] Re: Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause)

2015-05-08 Thread Helen Borrie hele...@iinet.net.au [firebird-support]
Steve, At 08:54 a.m. 8/05/2015, sboyd...@gmail.com [firebird-support] wrote: Had to change the coalesce with all the dates to cast each date individually or I got a conversion error. Not sure why. COALESCE(CAST(OPS_ONBOARD_TIME AS DATE), CAST(OPS_DELIVERED_TIME AS DATE), CAST(OPS_APPT_LOW AS

Re: [firebird-support] Re: Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause)

2015-05-07 Thread Svein Erling Tysvær svein.erling.tysv...@kreftregisteret.no [firebird-support]
Except that grouping by OPS_ZIP would not accomplish the same thing. Multiple zip codes map to the same REGION_ID and the zip codes might not be contiguous. Guess I'm going to have to rethink this. What about with tmp(PB_LOAD_TYPE, APPT_DATE, REGION_ID, PICKUP, DELIVERY) as (SELECT

Re: [firebird-support] Re: Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause)

2015-05-07 Thread sboyd...@gmail.com [firebird-support]
SET; That's slick. I'm going to have to read up on the WITH command. Had to change the coalesce with all the dates to cast each date individually or I got a conversion error. Not sure why. COALESCE(CAST(OPS_ONBOARD_TIME AS DATE), CAST(OPS_DELIVERED_TIME AS DATE), CAST(OPS_APPT_LOW AS