How SYSDATE will work if load is going more than one day

Database
Enthusiast

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?

Tags (2)
4 REPLIES
Enthusiast

Re: How SYSDATE will work if load is going more than one day

Hi All any info on this?

Teradata Employee

Re: How SYSDATE will work if load is going more than one day

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.

Enthusiast

Re: How SYSDATE will work if load is going more than one day

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.

Senior Apprentice

Re: How SYSDATE will work if load is going more than one day

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.