Re: How to test for empty Excel cell in SELECT ... WHERE
- From: "Sven Pran" <no.direct@xxxxxxxxxxx>
- Date: Mon, 25 Feb 2008 10:38:16 +0100
"Chris.Cheney" <Chris.CheneyXXNOSPAMXX@xxxxxxxxx> wrote in message
news:Xns9A4F594C6D0AChrisCheneytesconet@xxxxxxxxxxxxxxxx
"Sven Pran" <no.direct@xxxxxxxxxxx> wrote in
news:47c1d003@xxxxxxxxxxxxxxxxxxxxxx:
I am doing some trials with ADO connecting to MS Excel
along the lines suggested in
http://delphi.about.com/od/database/l/aa090903a.htm
I have run into a problem when trying to SELECT only rows where
the cell in a particular column is empty (or is not empty)
The error message I receive is: "Data type mismatch in criteria
expression" and the criteria I have tried include: '' ' ', "", " "
(single or double quote pairs
with nothing or one space between them).
The cell in question contains numbers and my statements like:
SELECT ... WHERE cellname = 1611
work as expected.
How can I specify empty (or not empty) cells in my WHERE clause?
WHERE columnname IS NULL
WHERE columnname IS NOT NULL
OH DEAR!
Of course - silly me.
My only excuse is that I was working late at night.
THANKS!
regards Sven
.
- References:
- How to test for empty Excel cell in SELECT ... WHERE
- From: Sven Pran
- Re: How to test for empty Excel cell in SELECT ... WHERE
- From: Chris.Cheney
- How to test for empty Excel cell in SELECT ... WHERE
- Prev by Date: Re: OLE DB Provider not found for SQL Compact edition even after installing
- Next by Date: Re: faster way to write tables?
- Previous by thread: Re: How to test for empty Excel cell in SELECT ... WHERE
- Index(es):
Relevant Pages
|