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.




sebastian palmigiani <[EMAIL PROTECTED]> on 09/13/2000 01:52:57 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: Jerry Tolentino/SIAC)
Subject:  Stored Procedure Help





How do you use the wildcard character % with an input parameter?

This does not work:

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.






------------------------------------------------------------------------------
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