Solved

sql Query

Posted on 2009-05-10
2
201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Merige returns error code when updating 15 57
Why do I get extra rows when I do inner join? 12 43
CROSS APPLY 4 61
Sql Server group by 10 49
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…
by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

749 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