I have the following procedure interface:
create procedure [dbo].[GetsItemDetails]
(
@SiteURL varchar
)
AS
select
*
from
s_ItemDetails
where
SiteURL = @SiteURL
When I call it this way:
DECLARE @return_value int
EXEC @return_value = [dbo].[GetsItemDetails] @SiteURL =
N'fgh'
SELECT 'Return Value' = @return_value
I get nothing when there is a record with siteURL “fgh”
You forgot to specify the size of the parameter.
Without size it is 1 character.
Specify the same size as your columns size for
SiteURL.Something like this: