Link to home
Start Free TrialLog in
Avatar of Gordon Hughes
Gordon HughesFlag 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?

Avatar of ste5an
Flag of Germany image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bill Prew
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