Solved

sql Query

Posted on 2009-05-10
2
200 Views
Last Modified: 2012-05-06
How can I rewrite the select statement without using IN


SELECT *
 
FROM dbo.tblcustomers
 
WHERE custstate IN ('CA','MI','WA')

Open in new window

0
Comment
Question by:iolike
2 Comments
 
LVL 1

Accepted Solution

by:
asitkaushik earned 500 total points
ID: 24349197
SELECT *
 
FROM dbo.tblcustomerss
 
WHERE (custstate ='CA' )OR (custstate ='MI') OR (custstate ='WA')
 
This can be one of an alternate query
0
 

Author Closing Comment

by:iolike
ID: 31579943
Thanks, it worked
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question