NULLS

G

Gaetan

I have inherited a data base which needs normalizing which I'm in the process
of doing. In the
mean time day to day biz must go on. I need the current people working for us
and the table
I'm using is very linier hence my comment for normallizing.

We have people that work with us but are not employed by us se we dont keep
info
on the such as birth dates and ssn #. These folks I eliminated by saying
birthday is not null.

The following SQL works:

SELECT [Employees 07-08].LastName, [Employees 07-08].FirstName, [Employees 07-
08].Birthdate, [Employees 07-08].DateTermed
FROM [Employees 07-08]
WHERE ((([Employees 07-08].Birthdate) Is Not Null) AND (([Employees 07-08].
DateTermed) Is Null));

We started to re-hire people that have previously lleft our employment. Two
field were added
to the table [Employees 07-08]

[Employees 07-08] [Re-Hired] AND [Employees 07-08] [Re-Termed]

The following SQL does NOT work. It gives me the same results as the SQL
above.

SELECT [Employees 07-08].LastName, [Employees 07-08].FirstName, [Employees 07-
08].Birthdate, [Employees 07-08].DateTermed, [Employees 07-08].[Re-Hired],
[Employees 07-08].[Re-Termed]
FROM [Employees 07-08]
WHERE ((([Employees 07-08].Birthdate) Is Not Null) AND (([Employees 07-08].
DateTermed) Is Null)) OR ((([Employees 07-08].[Re-Hired]) Is Not Null) AND ((
[Employees 07-08].[Re-Termed]) Is Null));

I'm trying to get my current employees ( 1 st SQL) Plus the [Re-hired ]
that are not [RE-terminated]
I know this is not the correct way to create a table. This one that I
inherited is painting me into a corner

Any help would be greatly appreciated

Thanks

Gaetan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top