Runs in QueryMan, fails in BTEQ

UDA
Enthusiast

Runs in QueryMan, fails in BTEQ

Hi All,

I have the following code:

INSERT INTO get_bcp_q_toctask
SELECT C_Ref ,
COALESCE(CAST(a.calendar_date AS DATE FORMAT 'YYYYMMDD'), CAST('19000101' AS DATE FORMAT 'YYYYMMDD')) Creation_date ,
CAST(CAST(Creation_Time AS TIME(0)) AS CHAR(8)),
CAST(CURRENT_TIMESTAMP(0) AS TIMESTAMP(0) FORMAT 'YYYY-MM-DDBHH:MI:SS')

FROM get_bcp_q_toctask_bse t1
LEFT JOIN tit_valid_dates a
ON t1.Creation_date = CAST(CAST(a.calendar_date AS DATE FORMAT 'YYYYMMDD')AS CHAR(8))
;

All the rows insert into the table when I run this in QueryMan, however I get an Invalid Time error when I run this in BTEQ.

Can anyone shed some light on this and thanks in advance.
1 REPLY
Enthusiast

Re: Runs in QueryMan, fails in BTEQ

I'm taking a bit of a punt here: check that Queryman and BTEQ are both running in the same mode, ie 'ANSI' mode or 'Teradata' mode.

Among other things, I think the modes accept slightly different sets of date and time formats.

Cheers,

Peter