1.

How do I force a fail inside of a SQL statement?

Answer»

In SSIS, tasks fail when there is an error. So, if your Execute SQL Task has a statement like the FOLLOWING, you should be able to FORCE a fail.

Example

declare @count int
select @count = select count(*) from my_table
if @count < 1000
begin
    raiserror(‘Too few rows in my_table’,16,1)
end
ELSE
begin
    — PROCESS your table here
end



Discussion

No Comment Found