Hi, everyone.
I'm using JMP 17. I want to insert or update the data in datatable into external database ssms.
Currently, I have a datatable. I want to compare the row of datatable. If the row of datatable is not exist in database then insert into database, else if it is existed in database then update into database.
I know the SQL have insert or update function but don't know the JMP script can make it or not.
what is the syntax or script to insert or update data?
This is SQL insert or update function
-- Insert or update into Table
MERGE INTO Report.dbo.Table AS target
USING #tempTable AS source
ON
target.logID = source.logID
WHEN MATCHED THEN
UPDATE SET
Value = source.value
WHEN NOT MATCHED THEN
INSERT (ID, ProductName, Time, Value)
VALUES (source.id, source.productname, source.time, source.value);
Thanks in advance