I am supposed to do incremental load and using below structure.
Do the statements execute in sequence i.e. TRUNCATE is never executed before first two statements which are getting data:
@newData = Extract ... (FROM FILE STREAM)
@existingData = SELECT * FROM dbo.TableA //this is ADLA table
@allData = SELECT * FROM @newData UNION ALL SELECT * FROM @existingData
TRUNCATE TABLE dbo.TableA;
INSERT INTO dbo.TableA SELECT * FROM @allData