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.
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
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
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