Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null Value in multiple Fields

Status
Not open for further replies.

bdmoran

MIS
Nov 7, 2011
87
US
Hi all - I have a table includes the following fields:

In time
Out Time
Actual IN
Actual Out

The problem is that sometimes employees forget to clock in or out which results in null values in the above fields.

I need a query that will pull data if one of these fields is null.
I know I can use the OR criteria for two fields but I was confused about what to do when there are more than two fields.

Hope you can help.
 
What is the problem ?
SELECT * from yourTable WHERE [In time] IS NULL OR [Out Time] IS NULL OR [Actual IN] IS NULL OR [Actual Out] IS NULL

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Then don't pay them for those days and they'll never forget again [upsidedown]

HTH << MaZeWorX >> "I have not failed I have only found ten thousand ways that don't work" <<Edison>>
 
How are ya bdmoran . . .

[blue]PHV[/blue] has the solution ... [blue]MazeWorX[/blue] has the [purple]fix![/purple]

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Or...since *any* NULL poisons any calculation making the result Null:
Code:
If (field1 + field2 + field3 + field4 + ....Fieldn) is null THEN
--Jim
 
Hey guys - Sorry for the delay but this is all set. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top