Skip to Content
0
Former Member
Oct 28, 2005 at 07:51 AM

SQLStored Procedure

18 Views

Hi,

ive problem with SQlstoredprocedure...

i have one like this:

CREATE PROCEDURE dbo.test

@in_surname char(255),

@surname char(255) OUTPUT,

@name char(255) OUTPUT,

@subsidiaries char(255) OUTPUT,

@dep_position char(255) OUTPUT,

@phone_number char(255) OUTPUT,

@fax_number char(255) OUTPUT,

@email char(255) OUTPUT

AS

SELECT @in_surname = RTRIM(@in_surname) + '%'

SELECT MyLegal_User.* FROM MyLegal_User

WHERE MyLegal_User.surname LIKE @in_surname

GO

but the problem is that the LIKE doesnt work correctly.. only values are given back that match exact the value given in input form..

does anyone know what is the problem?

Thanks for help!!

Karol