Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 LIKE statement and Variable

Author  Topic 

hueby
Posting Yak Master

127 Posts

Posted - 2005-06-06 : 11:30:11
Hey all, can I use the LIKE statement with a variable? Something like:

where PONumber LIKE @var%


Any ideas, or ways I can get something to this nature to work?

X002548
Not Just a Number

15586 Posts

Posted - 2005-06-06 : 11:32:03
LIKE @var + '%'

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

hueby
Posting Yak Master

127 Posts

Posted - 2005-06-06 : 11:35:30
Neat! Thanks Brett!!!
Go to Top of Page
   

- Advertisement -