Hi,
I want to delete the previous records when saving data in sql database table through odbc connection on the server
we use alteryx output tool. the reason behind that multiple users run the workflow from gallery. there could be case where same data will get uploaded in the database. so, i want to restrict the duplicate data to get saved in the databse.
I can see 'Pre Create SQL Statement' option in output tool.
Does anyone knows how to deal with this so that no duplicate data gets saved/uploaded in the database.
Exp - I have Reporting date as '2022-02-01' and i running the workflow from gallery. data will get saved in the database
but if any other person runs the same workflow which has reporrting date as '2022-02-01'. it should not be saved else already existing data should be deleted first and then new data should get appended in the database.
Thanks
Hi @Bunty
If your table has a primary key you can use Update: Insert if New this way it only updates the row if it already exists.
Hope this helps : )