BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tom
Super User Tom
Super User

All of the = signs are where you are comparing variables from one table with variables from the other table.

For at least one of those the one table has the variable a numeric and the other has it as character.

It probably is best to find out why and fix the tables.

If you cannot do this then you can convert the numeric variable value to character string using put() function.  For example put(a.status,1.).  Or if the character values are valid numbers you can use the INPUT() function to convert them to a number. Example input(b.status,1.)

Armand
Calcite | Level 5

i did :

select put(a.status,1.), put(b.status,1.)  or in the case when statement  i get this error:

 

ERROR: Expression using equals (=) has components that are of different data types.

ERROR: Numeric format F in PUT function requires a numeric argument.

ERROR: Numeric format F in PUT function requires a numeric argument.


any idea?

thanks!

mohamed_zaki
Barite | Level 11

from a.Client_Report2

left join b.Client_Report1 on a.Client_id=b.Client_id;

Is a and b refer to libref or you mean alias and your data set is in work ?

try

from Client_Report2 a

left join Client_Report1 b on (a.Client_id=b.Client_id);

Armand
Calcite | Level 5

sorry mistype

i did in my code as you mentioned above.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 34 replies
  • 93949 views
  • 4 likes
  • 7 in conversation