Comparing null and a character value

Reply
Contributor
Posts: 31

Comparing null and a character value

Hi,

I need some help with comparision of null and character values. Below is the code.


  else if aa and bb and affiliate_id =' ' and aff_id = not null then output;

run;

Trusted Advisor
Posts: 1,931

Re: Comparing null and a character value

else if aa and bb and affiliate_id =' ' and aff_id = not null then output;

If I am understanding you properly, you want something like this:

else if aa and bb and missing(affiliate_id) and not missing(aff_id) then output;

Contributor
Posts: 31

Re: Comparing null and a character value

Posted in reply to PaigeMiller

Yes. Thank you very much.

Ask a Question
Discussion stats
  • 2 replies
  • 216 views
  • 0 likes
  • 2 in conversation