Subject | Re: [firebird-support] Re: Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause) |
---|---|
Author | Helen Borrie |
Post date | 2015-05-08T20:03:47Z |
Steve,
At 08:54 a.m. 8/05/2015, sboydlns@... [firebird-support] wrote:
COALESCE(OPS_ONBOARD_TIME, OPS_DELIVERED_TIME, OPS_APPT_LOW, CURRENT_DATE)
Helen
At 08:54 a.m. 8/05/2015, sboydlns@... [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.Assuming OPS_ONBOARD_TIME, OPS_DELIVERED_TIME and OPS_APPT_LOW are all DATE type, does this solve that problem?
>
>COALESCE(CAST(OPS_ONBOARD_TIME AS DATE), CAST(OPS_DELIVERED_TIME AS DATE), CAST(OPS_APPT_LOW AS DATE), CAST('TODAY' AS DATE)),
COALESCE(OPS_ONBOARD_TIME, OPS_DELIVERED_TIME, OPS_APPT_LOW, CURRENT_DATE)
Helen