SQL query to validate empty cell in Excel

I have data in an excel sheet that has two columns and 10 rows. Some rows for the first column are blank. Excel shows this as (empty) when setting automatic filter to colunm

I am querying an excel sheet from C # 2.0 to see if the first column contains a space.

select * from [Sheet1 $] where [Myname] = \ "\" ";

The above query does not return any records, so I tried the query below.

select * from [Sheet1 $] where [Myname] = \ "\" ";

This either returns no rows. I also tried with NULL in the where clause, but it doesn't work either.

Can anyone help me write the correct query to validate empty fields in excel?

thank

0


source to share


1 answer


select * from [Sheet1$] where [Myname] IS NULL

      



This seems to work fine using System.Data.OleDb.

+2


source







All Articles