Is Null in a query (1 Viewer)

bouncingtigers

Registered User.
Local time
Today, 16:24
Joined
Aug 9, 2016
Messages
18
I want to run a query that shows a set criteria in 1 of 3 rows.

Example my table is as follows:

Name - T1 - T2 - T3
John 01:45 54:16
Steve 18:24 37:00

I want my query to only show any that contain blanks

I've set the criteria in all 3 to 'is null' but that prevents anything at all showing in the query

Thanks in advance for the assistance
 

plog

Banishment Pending
Local time
Today, 18:24
Joined
May 11, 2011
Messages
11,613
the WHERE clause of your SQL should use ORs not ANDs:

T1 Is Null OR T2 Is Null OR T3 Is Null
 

bouncingtigers

Registered User.
Local time
Today, 16:24
Joined
Aug 9, 2016
Messages
18
the WHERE clause of your SQL should use ORs not ANDs:

T1 Is Null OR T2 Is Null OR T3 Is Null

Thank you, I cant believe its that simple.

Any how, I still cant do it properly. This is my SQL:

Code:
SELECT tblSourceData.[Athlete], tblSourceData.[Gender], tblSourceData.[Competition Date], tblSourceData.[Swim], tblSourceData.[Bike], tblSourceData.[Run]
FROM tblSourceData;
WHERE tblsourcedata.[swim] is null or tblSourceData.[bike] is null tblSourceData.[run] is null

Where have I gone wrong with it?
 

plog

Banishment Pending
Local time
Today, 18:24
Joined
May 11, 2011
Messages
11,613
I only see 1 'OR', you need to seperate every evaluation by an OR.
 

bouncingtigers

Registered User.
Local time
Today, 16:24
Joined
Aug 9, 2016
Messages
18
I have updated it to:

Code:
SELECT tblSourceData.[Athlete], tblSourceData.[Gender], tblSourceData.[Competition Date], tblSourceData.[Swim], tblSourceData.[Bike], tblSourceData.[Run]
FROM tblSourceData;
WHERE tblsourcedata.[swim] is null or tblSourceData.[bike] is null or tblSourceData.[run] is null

But still getting the error 'Characters found at the end of SQL statement.'
 

plog

Banishment Pending
Local time
Today, 18:24
Joined
May 11, 2011
Messages
11,613
A semicolon denotes the end of an SQL statement. You have one in the middle.
 

Users who are viewing this thread

Top Bottom