Reputation: 171
I am having a doubt, can anyone please explain me why I am getting record in select query but not able to get the same when the query is executed from a stored procedure
Below ,select query retrieving records
and here no records for the same query in stored procedure
Upvotes: 0
Views: 139
Reputation: 10264
As pointed out the name is more than varchar(25) and same may hold true for other values of mnthname as well. So alter funciton definition as:
Alter proc FindsSring
(
@name varchar(max),
@STD varchar(10),
@Div varchar(2),
@month varchar(100)
)
As ...
Upvotes: 0
Reputation: 46919
It seems your @name
parameter of type varchar(25)
is to small to fit the example name in the query. It would be truncated and the query would give no result.
Upvotes: 1