My Input data stream is excel and it contains dates along with other data. If I run workflow twice, data is getting appended twice to sql table resulting in duplicate rows. So to avoid data duplicacy, I need to delete the data from sql table which is greater than minimum date of input data stream before appending the data from excel to sql table.
I am able to find minimum date by using summarize tool. How can I pass these minimum date to pre-sql statement so that I can delete previously appended data.
For example, I have last week data. Once I run macro, last week data get appended to sql table. If I re-run the query, last week data get appended to table again. Becuase Data doesn't have any unique colomns so database don't throw any error.
I am trying to delete the last week data if exists by using pre-sql statement. I am getting last week min date "07/10/2016", I am not sure how can I pass this date to pre-sql statement.
Thanks in advance.
Solved! Go to Solution.
The easiest way to pass a dynamic date string to Pre-SQL in the Input tool would be to imbed the Input tool inside of a batch macro and then pass the min date using a Text Box interface tool.
@Michael, Thank you. Is it possible to show some sample workflow?
I have created temporary sql table and passed minimum date in the data using summarize widget. Now I deleting the data using the column in the temporary table in Pre-SQL Statement.
Can you please attach an example of how we can do this?
Hi did you get any answers to this question, I am in a similar situation and want to know if I can pass a string in a pre sql statement if anyone knows how to do that please let me know
It's not solved and there is no answer in this thread.
Why is it marked as SOLVED???