That should do what you want without any undesirable side effects that I can think of. I don't believe you'll see much if any difference in the performance (SQL Server version 7+) - but it is possible that some very skewed index may produce different execution plans - I don't know.
HTH, Tore. -----Original Message----- From: Nick Middleweek [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 29, 2002 6:31 PM To: ActiveServerPages Subject: These two SELECT are the same but... SELECT Name FROM dbo.LOH_Buildings WHERE Name = 'london house' SELECT Name FROM dbo.LOH_Buildings WHERE Name LIKE 'london house' ... do they do anything different? I'm using MSSQL 2K. I want to provide a begins with, ends with and contains search option and was hoping I could just append a '%' on either or both ends of the string the user enters. What are your thoughts? Thanks, Nick --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
