i have a stored procedure with a cursor in it...and in the result set its going to produce two o/p tables
result:
col1 col2 col3 col4 col5
Edit false false 5555555555 NULL
New Record false NULL NULL NULL
column1 column2 column3 column4 column5
New Record 6B3 03 31 S01ECC60UNI
New Record 6B4 03 31 S01ECC60UNI
New Record 6B5 04 31 n S01ECC60UNI
when i used this Procedure in SSRS.............its producing an error like
Invalid length parameter passed to the SUBSTRING function.
but i was able to get result set in management studio with out errors................
n i used in my SP like
elect @WhereClause5 = @WhereClause5 + ' n.' +
(Reverse(substring(Reverse(Objectname), 0, charindex('.', Reverse(Objectname))) ) + ' , ') + ' b.' +
(Reverse(substring(Reverse(Objectname), 0, charindex('.', Reverse(Objectname))) )+ ' , ')
from dbo.basetable
where RuleID = @baseObject