473,387 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Q: OR(ing)

Hi

Can anybody show me if there is an alternative syntax to the following psudo
code in SQL:

SELECT tblA.first, tblA.second FROM tblA WHERE (((tblA.third)= 23) OR
(tblA.third)=42) OR (tblA.third)=56)));

i.e. is there a way of writing something like:

WHERE tblA.third = 23 OR 42 OR 56;

?

Thanks in advance

Geoff
Jul 23 '05 #1
2 1195
On 04/05/2005, Geoff Jones wrote:
i.e. is there a way of writing something like:

WHERE tblA.third = 23 OR 42 OR 56;


WHERE tblA.third IN (23,42,56);

--
felix
Jul 23 '05 #2
Thanks Felix - brilliant!!!
"Felix Geerinckx" <fe*************@gmail.com> wrote in message
news:xn**************@news.easynews.com...
On 04/05/2005, Geoff Jones wrote:
i.e. is there a way of writing something like:

WHERE tblA.third = 23 OR 42 OR 56;


WHERE tblA.third IN (23,42,56);

--
felix

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: Alan | last post by:
I have many OR in the if statement, any method to simplify? if (val == 5 | val == 9 | val == 34 | val == 111 | val == 131 | .......) // .... thank you
2
by: Vishy | last post by:
Hi One of the less documented features of xpath is how to run multiple search on nodes or attributes e.g <Book name="Harry Potter" price="10GBP"/> <Book name="Harry Potter" price="5USD"/> now...
13
by: Mark A. Odell | last post by:
I write a lot of drivers and there is inevitably some hardware register or buffer descriptor field called 'flags'. The flags are defined, typically, as bit positions. I was thinking I could get...
5
by: Tim Gallivan | last post by:
I have 2 functions, CheckThis and CheckThat. Each function can return some of the error codes in the Enum below (CheckThis can return 0, 1, 2 or 3 and CheckThat can return 0, 4, 5 or 6). I'm trying...
2
by: Peter Oliphant | last post by:
Sometimes it's hard to get straight when passing or storing or returning an instance of a class whether you are still dealing with the original object or a copy. For example, the '=' operator used...
3
by: teranews | last post by:
My question is this... Is 'LINK'ing a stylesheet required before 'IMPORT'ing another for successful hovering? I have a problem which cropped up with the introduction of IE 7 Beta 2... Yes.....
20
by: oswald.kluge | last post by:
Dear Reader, what efficient ways are there to OR two large memory regions? I'm especially interested in applying this operation to two large character arrays. I know memset and memcopy lets...
6
by: James | last post by:
Can someone explain to me what the Or does here? Dim intReply as Integer = _ MsgBox(strPrompt, MsgBoxStyle.OKCancel Or MsgBoxStyle.Critical Or MsgBoxStyle.DefaultButton2, strTitle) I don't...
318
by: jacob navia | last post by:
Rcently I posted code in this group, to help a user that asked to know how he could find out the size of a block allocated with malloc. As always when I post something, the same group of people...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.