April 11, 2009 at 11:01 pm
hi all,
I m having a stored procedure which returns two result sets based on the success or failure.
Resut set for success contains :name,id,status
Result set for failure :error_id,error_desc,appl
I m using the following query to get the result of the stored procedure .It returns 0 for success and -1 for failure.
declare @ret int
DECLARE @Tmp TABLE
(
name CHAR(70),
id INT,
status char (1)
)
insert into @Tmp
EXEC @ret = sptest '100','King'
select @ret
select * from @Tmp
If the procedure is success i m getting the value in the temp table.If it fails i m getting a error like
"Insert Error: Column name or number of supplied values does not match table definition."
Can some one pls help me to handle both the result sets.
April 13, 2009 at 5:19 am
This post is in the wrong forum. It should be in the T-SQL Forum, not SSIS. Ask the moderator to move it.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply