Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello!

I try to read out from a GDB, this way:
C#
string sql = "select * from test where start > '2011.04.22. 00:00:00'"


But there are a lot of blank cells, because they aren't started yet. I want these cells to be listed. How can I check it?

Edit:
Image:http://img198.imageshack.us/img198/4467/testvw.png[^]
Posted
Updated 25-Apr-11 20:24pm
v3
Comments
ZeeroC00l 26-Apr-11 2:20am    
What you mean by lot of blank cells ??
can you post an example of how your table looks like with a few data inserted into it.?
velvet7 26-Apr-11 2:26am    
Image above.

Why don't you just check for nulls instead?
Or you could provide a default value into your table column.
 
Share this answer
 
Comments
velvet7 26-Apr-11 2:24am    
Actually the problem is this is not my database. It is generated by another program.
And the database doesn't allow NULL.
Sergey Alexandrovich Kryukov 26-Apr-11 2:27am    
Does not allow Null? SQL?!
That's new to me. I'm not an expert, but did anyone heard about such stuff?

Thank you.
--SA
velvet7 26-Apr-11 2:31am    
"I try to read out from a GDB".
I just need an SQL command.
Anyway, to be exact the field is set to "Not null".
CodeHawkz 26-Apr-11 2:34am    
@SA: I think he meant, the fields in his table does not allow nulls.

@Abhinav: Why don't you try checking the length of the field after trimming? If it is zero, it should be the blank :) Just a thought
velvet7 26-Apr-11 2:38am    
To answer to the question you asked from Abhinav: I would like to make the read time a bit shorter this way, because now it takes ~3 second (on my computer, and this will be used on a slower one!). So to check it, I have to read all cells.
The comments were growing too long to keep track of, so I am posting this as an answer instead.

Can you please, post the create table SQL of the particular table you are talking about, well, if the table got around 100+ fields, omit other fields. And also, tell us what is the database engine that you are using? GDB is for what kind of database?

Regards
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900