Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Where clause

Author  Topic 

lingtrin
Starting Member

13 Posts

Posted - 2007-08-22 : 14:57:22
Hi, I have an SQL sentence wich I have to modify, here's a shot sample:
Select * from table1 where row1 = "a"
What I want to do is to add another condition to the where clause on the same row to filter also by "c", can't use between, since I don't want to also add "b", how should this be done?

X002548
Not Just a Number

15586 Posts

Posted - 2007-08-22 : 14:58:33
row1 IN ('a','c')

?????????????????

There's gotta be more to this

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

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

lingtrin
Starting Member

13 Posts

Posted - 2007-08-22 : 15:09:43
Thanx that did it
Go to Top of Page

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2007-08-23 : 07:39:19
"Select * " is naughty.

using double quotes is naughty.

I will bet cash money your data isn't normalized either.

[Signature]For fast help, follow this link:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page
   

- Advertisement -