All Forums Database
Moutusi 38 posts Joined 03/13
24 Feb 2015
How SYSDATE will work if load is going more than one day

Hi,
My code will insert system date to a target table with some other columns from source tables. If that code execution takes more than one day, or if the execution time crosses midnight, will I get different dates in target table? Or it will consider the date when the execution started?

Thanks, Moutusi
Moutusi 38 posts Joined 03/13
18 Mar 2015

Hi All any info on this?

Thanks,
Moutusi

MaximeV 19 posts Joined 11/13
19 Mar 2015

From what I experienced , if it's made by a single sql statement, you get one date at the execution of query. And on Teradata, it's current_date, not sysdate.

ravimans 54 posts Joined 02/14
20 Mar 2015

You will get different date as system date for the next day will be that day current date. You can also try with current_date or date.

dnoeth 4628 posts Joined 11/04
22 Mar 2015

Hi Moutusi,
assuming SYSDATE indicates you're using MultiLoad or TPump:
SYSDATE & SYSTIME will be the same for all rows loaded, but this is clearly mentioned in the manuals, e.g.

&SYSDATE, &SYSDATE4, &SYSTIME, and &SYSDAY reflect the time when Teradata TPumpĀ begins execution.

CURRENT_DATE/TIME/TIMESTAMP will be the same within a request, TEMPORAL_DATE/TIME/TIMESTAMP within a transaction.

Dieter

You must sign in to leave a comment.