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.
| Author |
Topic |
|
Pistris
Starting Member
5 Posts |
Posted - 2008-05-27 : 12:47:40
|
| Is it possible for an AND statement to take mulitple parameters? See below code:SELECT tblQuestion.Question, tblAnswer.AnswerFROM (tblAnswer INNER JOIN tblQuestion ON tblAnswer.QuestionID = tblQuestion.ID)WHERE (tblAnswer.StateID = ?) AND (tblAnswer.QuestionID = 14)Is something like this possible?:AND (tblAnswer.QuestionID = 14, 26)Thanks |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-27 : 12:51:38
|
| AND tblAnswer.QuestionID IN (14, 26)Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
Pistris
Starting Member
5 Posts |
Posted - 2008-05-27 : 13:00:08
|
| Great...thanks tkizer. Just what I needed. |
 |
|
|
|
|
|