Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
how I can set up a conditional table drop.
For example:
If the current date equals January 1st all data of a table have to be deleted .
All other days data will only be inserted into the table.
Can I use tReplicate and two DBOutput?
Thanks for any advice.
Hello,
With the action performed by DROP , you could use a select query in the same DB table to check whether the table can meet your condition and assign it to a context variable and then have an RunIf trigger from t<DB>Input where you can test the globalMap variable created to see if it's >0 and so trigger t<DB>Row to delete table if you want.
Best regards
Sabrina
WHERE clause mainly used along with the DELETE command. No clause required along with DROP command. Actions performed by DELETE can be rolled back as it uses buffer. Actions performed by DROP can't be rolled back because it directly works on actual data.
Hello,
With the action performed by DROP , you could use a select query in the same DB table to check whether the table can meet your condition and assign it to a context variable and then have an RunIf trigger from t<DB>Input where you can test the globalMap variable created to see if it's >0 and so trigger t<DB>Row to delete table if you want.
Best regards
Sabrina
Thanks for sharing. It is clear for me