Howdy. I'm trying to build a query that will take an Excel file and
pull a few rows of data from a particular sheet. I'm having a problem
with my WHERE clause - I can can tell it to import WHERE a field
matches a value, or WHERE the field matches another value, but not
both.
I've tried bunches of different variations, but can't get it to work.
Is there any way to do this?
Works:
select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12
from `RAF082604$`
where ((F1 = 'Body'))
Works:
select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12
from `RAF082604$`
where F1 = 'Cash'
Doesn't:
select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12
from `RAF082604$`
where F1 = 'Body' OR F1 = 'Cash'
Doesn't:
select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12
from `RAF082604$`
where (F1 = 'Body' OR F1 = 'Cash')
Doesn't:
select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12
from `RAF082604$`
where ((F1 = 'Body') OR (F1 = 'Cash')) 1 4214
Did you try:
select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12
from `RAF082604$`
where F1 = 'Body'
union all
select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12
from `RAF082604$`
where F1 = 'Cash'
or
select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12
from `RAF082604$`
where F1 in ( 'Body', 'Cash')
"Michael Bourgon" <bo*****@gmail.com> wrote in message
news:55**************************@posting.google.c om... Howdy. I'm trying to build a query that will take an Excel file and pull a few rows of data from a particular sheet. I'm having a problem with my WHERE clause - I can can tell it to import WHERE a field matches a value, or WHERE the field matches another value, but not both. I've tried bunches of different variations, but can't get it to work. Is there any way to do this?
Works: select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12 from `RAF082604$` where ((F1 = 'Body'))
Works: select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12 from `RAF082604$` where F1 = 'Cash'
Doesn't: select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12 from `RAF082604$` where F1 = 'Body' OR F1 = 'Cash'
Doesn't: select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12 from `RAF082604$` where (F1 = 'Body' OR F1 = 'Cash')
Doesn't: select F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12 from `RAF082604$` where ((F1 = 'Body') OR (F1 = 'Cash')) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Sean Dettrick |
last post by:
Hi,
I have several <vector>'s of the same length, with entries
as follows:
I=
A=
B=
I want to use STL to make (I == 0) a mask to operate on the
elements of A and B, i.e. I want to do this:
|
by: Phillip |
last post by:
Select member
from NameList
Inner join Members
on (Left(Namelist.NameID,5) = Members.ID
OR (left(namelist.SSN,9) = Members.ssn
OR (Left(namelist.CustID,9) + '*01' = Members.CustID)
where...
|
by: Colleyville Alan |
last post by:
I am constructing a SQL command from a function. Some code builds the WHERE
clause in a looping structure and passes that as an argument to the
SQL-building function. But the results do not...
|
by: Julio Allegue |
last post by:
I am getting the wrong Count(*) on vb.net using the ExecuteScalar . It
returns all the rows. It doesn't seem to look at the WHERE clause. At
the same time, I am getting the correct count on "SQL...
|
by: Jerome Ranch |
last post by:
Okay
So I've got pivot tables setup in Access 2003.
Only about 30K records in the current 2005 databases...the pivots
summarize the info in a number of nice ways.
I need to get the pivot tables...
|
by: comp.lang.php |
last post by:
$orderBy = 's.app_date desc, s.last_name asc, s.first_name asc, s.mi
asc';
if ($_REQUEST) {
$ascArray = array('asc' => 'desc', 'desc' => 'asc'); // ARRAY OF
ALL ORDERING POSSIBILITIES
$junk =...
|
by: veaux |
last post by:
Peeked around here but didn't really see an explanation as to the
varied "Invalid Argument" errors that appear in Access sometimes. I'm
using Access 2003 and trying to import an Access table of...
|
by: silversubey |
last post by:
Hello all.
I have an excel query that pulls data from a SQL database. I have 2 parameters that represent the and of a between criteria. Here is the query.
SELECT CltDue.CDClientName
,...
|
by: Manikrag |
last post by:
Hi Guys,
Is it possible to have query result in a excel or csv file instead of having it in a datareader or dataset. please let me konw one or the other way to do it.
Thanks,
Manik
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |