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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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