![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I appreciate people's help in advance. Here is my issue: I have created an Integration Services Package that contains an Execute SQL task with the following code: BEGIN SELECT * FROM dbo.TABLE WHERE Period+Year IN (SELECT (Period+Year)SearchOn from TBL_OUTPUT GROUP BY Period+Year) IF @@ROWCOUNT = 0 RAISERROR ('MSG',21,1) END The purpose of the code is to check for a record in the "TABLE" table before kicking off the extract to a flat file. I am running into an issue. When I run the code in SQL Management Studio, it raises the correct execption ("No Data Found"), however, when I run the same code in the Execute SQL task, it does not fail the task, the task complete sucessfully. I would like the Execute SQL task to fail if there are no records in the table for the period and year combination. I understand that the RAISERROR command is an issue in 2000, but I am still having issues with 2005. I look forward to people's thoughts. |
![]() |
| Thread Tools | |
| Display Modes | |
| |