SQL Server Forums
Profile | Register | 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
 New Topic  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  
 New 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