October 29, 2008 at 1:01 pm
I have table in MS ACCESS:
has hire_date, rehired_Date, Termination_Date.
I want to
select rehired_date as hire_date when terminate_date
How to write this statement ?
ig:
hired_date as 10/1/07
termination date 10/03/07
rehired_date 10/2/08
then the hired_date will outcome as 10/02/08
hired_date as 10/1/07
termination date 10/02/07
rehired_date null
then the hired_date will outcome as 10/01/07
hired_date as 10/1/07
termination date 10/03/07
rehired_date is 10/02/07
then the hired_date will outcome as 10/02/07
Thx.
October 29, 2008 at 1:09 pm
Frances L (10/29/2008)
I have table in MS ACCESS:has hire_date, rehired_Date, Termination_Date.
I want to
select rehired_date as hire_date when terminate_date
How to write this statement ?
ig:
hired_date as 10/1/07
termination date 10/03/07
rehired_date 10/2/08
then the hired_date will outcome as 10/02/08
hired_date as 10/1/07
termination date 10/02/07
rehired_date null
then the hired_date will outcome as 10/01/07
hired_date as 10/1/07
termination date 10/03/07
rehired_date is 10/02/07
then the hired_date will outcome as 10/02/07
Thx.
Not seeing termination date having anything to do with what is returned. Looks to like you want something like this:
select isnull(rehired_date, hired_date) from sometable
October 29, 2008 at 3:18 pm
If you're using natve Access queries - you will need to use the NZ function instead of the ISNULL function Lynn mentioned (ISNULL is something different in Access).
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply