Hi all!
I have a simple procedure which should return an 'id' field if parameter is passed.
The problem is that if I provide the single letter parameter it returns no records although there are matches. But if i provide the whole word as it's written in a table, I get records returned.
the code:
USE [database]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[filter_opombe]
(
@opombe_par nchar(256)
)
AS
BEGIN
(
SELECT Id_opombe
FROM opombe
WHERE (CHARINDEX(@opomba_par, opomba,0) > 0)
)
END
Many thanks in advance!