Jump to content

HELP.....NULL TEST?


robert fuschetto

Recommended Posts

I have this join which takes my big table with 1000's of records an links to an xref with 100 records - note it is a LEFT outer join:

JOIN

LEFT_OUTER HOLD_VISITWRVUS_PRELIM4.HOLD_VIS.NPIALPHA IN HOLD_VISITWRVUS_PRELIM4

TO MULTIPLE HOLDNEWHIRES.SEG01.NPIALPHA IN HOLDNEWHIRES TAG J11 AS J11

END:

I then have this define:

NEWHIRE/A1=IF J11.SEG01.NEWHIREFLAG EQ 'Y' THEN 'Y' ELSE 'N';

Now at this point I think what is happening is that NEWHIRE has a value of 'Y' for the 100 records where there is a hit. I SUSPECT that where there is not hit, NEWHIRE is NULL......not 'N' as I had hoped.

Do you concur?

I suspect this because when I report NEWHIRE I ONLY see values of 'Y' and NULL...no 'N's.

The trouble is I need the records where there is no match to carry and 'N' not a NULL.

It feels like I need my NEWHIRE definition to say

IF J11.SEG01.NEWHIREFLAG EQ 'Y' THEN 'Y' ELSE IF THERE WAS NOT A MATCH THEN 'N".

How could I code do this?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...