0
votes

we are inserting values to a table through a procedure , one values we are inserting is current_timestamp. throwing below while inserting timestamp values. too many arguments for function [TO_TIMESTAMP(CURRENT_TIMESTAMP(), 'DD-MM-YYYY HH:MI:SS')] expected 1, got 2\n Stack Trace:\nundefined\n

below is the syntax:

var create_vol1=snowflake.execute({sqlText: "INSERT INTO CDW_DB.LOAD_timestamp VALUES (TO_TIMESTAMP(Current_Timestamp,'DD-MM-YYYY HH:MI:SS'))"});

please correct me if i am wrong here.

Thanks

1

1 Answers

1
votes

The current_timestamp function already returns a timestamp so you don't need to do anything to it. Just insert it like this:

INSERT INTO CDW_DB.LOAD_timestamp VALUES (Current_Timestamp)