?
Solved

comparing Time with a Null value

Posted on 2003-02-23
5
Medium Priority
?
202 Views
Last Modified: 2010-04-04
please correct this please

DataModule1.table_DTR.filter := '(Employee_ID = '+employee_ID+') and '+'(isOVERTIME = FALSE) and '+'(ShiftCode = '+ShiftCode+') and '+'(Time_In <> '+null+') and (Time_Out ='+null+')';

DataModule1.table_DTR.Filtered:=true;




this will result an error, returning that time_in and Time_out will not accept a "null" value. how can i compare those time_in and Out with the value "empty" or no value at all, and identifying if that Time_in or Time_out is empty or not.



0
Comment
Question by:ryan_sabarre
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 

Author Comment

by:ryan_sabarre
ID: 8005399
anybody can help me please
0
 

Author Comment

by:ryan_sabarre
ID: 8005402
or using this function

DataModule1.table_DTR.Locate('Employee_ID;isOVERTIME;ShiftCode;Time_Out', VarArrayOf([employee_ID, FALSE, ShiftCode,not null]), []);

i want locate time_out having any value.

0
 
LVL 2

Expert Comment

by:lortega
ID: 8005519
Try

table_DTR.FieldByName('Time_Out').Required := False;
table_DTR.FieldByName('Time_In').Required := False;

before set the Filtered to true



Luis
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 400 total points
ID: 8006253
+'(Time_In is not null) and (Time_Out is null)';

meikl ;-)
0
 

Author Comment

by:ryan_sabarre
ID: 8006847
thank you so much
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question