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)
 In statement with like
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Sun Foster
Aged Yak Warrior

515 Posts

Posted - 04/29/2006 :  08:38:02  Show Profile  Reply with Quote
I created a search program use Variable (VarModel, get value from text box) and like as bellow:
... where Model like 'VarModel%'
It works fine.

Now, I need add 3 text boxes to assign to 3 variable, Var1, Var2 and Var3, how to make where clause?

I knew that clause like bellow will not work:
... where Model in (like 'Var1%', like 'Var2%',like 'Var3%')

Can someone show a way to get same result so that user can input '%' in three input boxes to search?


chiragkhabaria
Flowing Fount of Yak Knowledge

India
1907 Posts

Posted - 04/29/2006 :  09:11:51  Show Profile  Visit chiragkhabaria's Homepage  Send chiragkhabaria a Yahoo! Message  Reply with Quote
how about this ??

Where (Model Like 'var1%' OR Model like 'var2%' OR Model like 'var3%')??

If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them.
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.11 seconds. Powered By: Snitz Forums 2000