If i run a sql EXEC() command, then how i confirm that the command is executed properly.Because i don’t find any success/failure return type of this command.
Let say my command is:
EXEC('INSERT into '+@t1+'('+@c1+') values ('+@v1+')')
or any other way to be confirm that, the command is execute properly into the destination table.
Try to use global variable
@@rowcountafter a exec command:It displays rows affected by the last command.
If you want to catch an exception:
MSDN about
try-catch.