on 9/13/00 3:35 PM, Jerry Tolentino at [EMAIL PROTECTED] wrote:

> If @FirstName is a CHAR or VARHCAR then you can just concatenate the
> strings like so:
> 
> SET @FirstName =  @FirstName + '%'
> 
> Then just @FirstName in your query. SQL should handle all the quoting
> issues... if I am not mistaken.

With a regular SQL query

SELECT FirstName, LastName
FROM Members
WHERE FirstName LIKE 'Pat%' AND LastName = 'Wooldridge'

I get 2 records

But with the stored procedure with the same value for the input parameters -
Pat Wooldridge - as above I get only 1 record.

Set @FirstName = @Firstname + '%'

SELECT FirstName, LastName
FROM Members
WHERE FirstName LIKE @FirstName AND LastName = @LastName

Sebastian

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to