Solved

sql Query

Posted on 2009-05-10
2
191 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now