I've got a CR (XI) calling a SP (SQL Server 2005) but returning no data. So I go to check out the (new, by the way) SP. It looks something like this:
When I call the SP from within SQL Server, it also brings back no data. Yet if I run the select statement only, with a valid value in place of the parameter, it brings back data. What am I doing wrong?
Code:
@Prm char
AS
SELECT tbl1.fld1, tbl2.fld1, tbl3.fld1, tbl1.fld2, tbl2.fld2, tbl3.fld2
FROM (TABL1 tbl1 INNER JOIN TABL2 tbl2 ON tbl1.fld1 = tbl2.fld1)
INNER JOIN TABL3 tbl3 ON tbl1.fld2 = tbl3.fld2
WHERE tbl1.fld3 = @Prm
When I call the SP from within SQL Server, it also brings back no data. Yet if I run the select statement only, with a valid value in place of the parameter, it brings back data. What am I doing wrong?