All records where there is a value
Posted on 2008-11-06
I am trying to retrieve all records where there is only a value in the T_Customers.Postcode with the following query, but it doesn't give me the right result, can anyone help?
SELECT T_Customers.CustomerID, T_Customers.CustTypeID, T_Customers.Surname, T_Customers.Forename, T_Customers.TitleID, T_Customers.Ref1,
T_Customers.Add1, T_Customers.Add2, T_Customers.Add3, T_Customers.Add4, T_Customers.County, T_Customers.Postcode
WHERE exists ( select * from T_Customers where T_Customers.Postcode ='');