473,385 Members | 1,347 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,385 software developers and data experts.

Other option than OR

ddtpmyra
333 100+
I have a two columns that hold numbers of sales for every month for instance. For every row I wanted to select the records that falls to greater than or equal to 10 sales.

How can I put it on a query.

Ex.
StoreName|May|June
StoreA |5|10
StoreB |10|5
StoreC |5 |5
StoreD |12|1

Query Result must be:
StoreA 5 10
StoreB 10 5
StoreD 12 1

My current condition query is like this
Expand|Select|Wrap|Line Numbers
  1. WHERE [May]>=10 OR June>=10
My question is how to make it equal or either any of two columns has 10 or greater
May 16 '11 #1
5 1576
TheSmileyCoder
2,322 Expert Mod 2GB
I don't think im following you. You seem to be asking for what your query is allready giving you. Could you try to explain in more detail, or rephrase it?
May 16 '11 #2
ddtpmyra
333 100+
Expand|Select|Wrap|Line Numbers
  1. WHERE [May]>=10 OR June>=10 
  2.  
Above is the condition I have on my query right now. The problem is it consider first the May columns that has =>10 first before the June columsn. What I wanted is either of the two columns (may or june) has greater equal to 10 is to fetch the records.

currently scenario:
StoreName|May|June
StoreA |5|10
StoreB |10|5
StoreC |5 |5
StoreD |12|1
RESULTS:
StoreB |10|5
StoreD |12|1

Wanted RESULTS:
StoreA |5|10
StoreB |10|5
StoreD |12|1

I hope I explain this very well let me know if you need more further explanation or samples.

thanks!
May 16 '11 #3
TheSmileyCoder
2,322 Expert Mod 2GB
Thank you, I have a much clearer idea of what you want now, and which parts are not working as expected.

Have you tried using square brackets [] around June?
May 16 '11 #4
ddtpmyra
333 100+
Oh no, It's just my typing. But I dont have problem with my query. My problem is how to fetch the records using different ways on my conditions.
May 16 '11 #5
NeoPa
32,556 Expert Mod 16PB
ddtpmyra:
Oh no, It's just my typing.
That's exactly why you should never type the information for your questions but Copy and Paste it from your work. It takes very little effort on your part and potentially saves a lot of time. A very important point to remember for future posts.

As for your question, it still seems somewhat unclear. Your English is not easy to understand (although I'm sure you're trying to express it as well as you can) so perhaps you can explain what you need and why. If your query already works, why do you need an alternative approach (I think this is what you're asking for). Certainly, like Smiley, I can see no reason why what you already have (assuming it is corrected) would not provide exactly what you say you want.

Maybe it's as simple as using parentheses correctly :
Expand|Select|Wrap|Line Numbers
  1. WHERE ([May]>=10)
  2.    OR ([June]>=10)
May 17 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Abby Lee | last post by:
I want to check the value for a dropdown menu for "other" to make it so they can add a location that is not on the list. If the value = "other" I will bring up a dilog box they can enter their...
3
by: Iain Hallam | last post by:
Hi. I've been using display:none on the style property of some <option> elements in my forms, which works fine with Mozilla - as expected it removes the option from my dropdown (although it...
0
by: Lance | last post by:
hi all, i'm writing a class that shows geotiff tag information. while there are only 6 geotiff tags, each tag contains a geokey, and these keys can contain a code number representing the name...
2
by: Nowezo | last post by:
Hi, Can you please help me, I want to write a dropdown box that have an option 'Other' but when the Other is selected my textbox need to be enable and take the textbox value as an output instead of...
3
by: gttby | last post by:
Please Help , I am trying to output text in different lines in a richtextbox the vbCrlf seems not work... below is an e.g of code txtitemisedbill.Text = "Smile:-" & vbCrLf txtitemisedbill.Text...
1
by: fbk2k5 | last post by:
hi i have a problem to connect the user inside the stored procedure in oracle i tried option CREATE OR REPLACE PROCEDURE Chk_Permission AS UserID VARCHAR2(10):='1234'; fname...
0
by: suvarna1026 | last post by:
Can anyone tell me,if there is another option to InternetConnect API.Bcoz it generating handle as 0.When I enter second parameter as IP address,I m getting error 12007:Server Name could not be...
10
by: dkyadav80 | last post by:
<html> /// here what shoud be java script for: ->when script run then not display all input text field only display selection field. ->when user select other value for institute only this...
3
by: jerrydigital | last post by:
good evening, I am trying to allow my users to enter in text if they don't find their option on my drop down menu. In the code below, I can get a text box to show up when I select 'Other' on the...
19
by: uhdam | last post by:
Hai... I need to have image as tooltip. Is it possible. If yes how. I dont want to use applet. When i scroll over the label in my frame the pop up containing the image should be displayed. How can...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.