Filtering results with SQL Server and ASP
Posted on 2007-07-20
i have got the following query which works to a point, except the very last part is not filtering out correctly. Let me explain, the last part Hs$Contact.[Status Code] = 'A' is filtering out people with other letters e.g. L is left, D is deceased, the A is for active, however it returns all records including people with status code L and D
Any ideas on how to tweak it to work right?
SELECT dependant_type.*, Hs$Contact.*
FROM dependant_type, Hsd$Contact
WHERE (dependant_type.[ID] = Hs$Contact.[dependant type]) AND (Hs$Contact.[Main Member Code] = MMColParam) AND (Hs$Contact.[Status Code] = 'A')