Avatar of Gordon Hughes
Gordon Hughes
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Problem with Query

I have the following query but is will not bring back data

select * from MembersDetails
where Isnull [Email] and [Renewal Date] > '2019-04-2 00:00:00.000' and [Age] > 18
order by [Membership Main]

What is wrong?

Gordon
Microsoft SQL Server

Avatar of undefined
Last Comment
Bill Prew

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
ste5an

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Bill Prew

Or if you wanted to select both cases where [Email] was NULL, or blank, perhaps you were looking for:

select * 
from MembersDetails
where Isnull([Email], '') = '' 
and [Renewal Date] > '2019-04-02' 
and [Age] > 18
order by [Membership Main]

Open in new window


»bp
Your help has saved me hundreds of hours of internet surfing.
fblack61