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