Link to home
Start Free TrialLog in
Avatar of Lorna70
Lorna70

asked on

SQL not returning expected results for blank fields.

Why does the following still return records where Company_Name field is blank??  Could there be spaces and if so, how do I ensure these records are not in the results set??

SELECT * FROM Customers
      WHERE (Company_Name IS NOT NULL
      AND Company_Name <> '')
ASKER CERTIFIED SOLUTION
Avatar of Anuj
Anuj
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Lee
Lee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial