I have two tables A & B. Table A contains updated data that I want to move to B. However if there is no data in table A then I do not want to leave the existing data in table B.
I have this set up in a SSIS package and want to use a SQL Task to first find out if there exists data in Table A. I have tried a few statements but continue to get errors.
Logically I want to:
1. Check to see if Table A has data (If exists)
2. If 1 is yes, then Truncate Table B and insert new data
3. If 1 is no, then do nothing
I have tried a number of statements but only get errors.
Any assistance would be appreciated.