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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 LIKE statement and Variable
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

hueby
Posting Yak Master

USA
127 Posts

Posted - 06/06/2005 :  11:30:11  Show Profile  Reply with Quote
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 - 06/06/2005 :  11:32:03  Show Profile  Reply with Quote
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

USA
127 Posts

Posted - 06/06/2005 :  11:35:30  Show Profile  Reply with Quote
Neat! Thanks Brett!!!
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000