I have two tables where A is the source and B is the destination, so what needs to be achieved, when A has no data don't truncate B when A has data truncate B and insert data from A. Need help
if (select count(*) from [A]) > 0
truncate table B
Insert into B ([name],[userid],[ItemCreatedWhen])
SELECT [Full Name],[UserID],getdate()
It's better to fail while trying, rather than fail without trying!!!