delete previous records based on criteria before saving data into database through alteryx
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Labels:
- Database Connection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 : )
