proc sql;
create table final_data_set as
select field_name
, value1
from HSD.types_OfAttempts
UNION ALL
select put(field_name, Z3.)
, value1
from HSD.number_attempts
UNION ALL
select put(field_name, Z3.)
, value1
from HSD.final_timeframes
;
quit;
The first dataset has field_name as character. It has types of attempts made like phone, email, face2face.
The last two datasets have field_name as numeric.
ERROR: Numeric format Z in PUT function requires a numeric argument.
Well, your error message contradicts your statements regarding the variable type.
Review the proc contents output of each of your three datasets and modify your code accordingly.
If that still does not work, post the results of your proc contents.
Well, your error message contradicts your statements regarding the variable type.
Review the proc contents output of each of your three datasets and modify your code accordingly.
If that still does not work, post the results of your proc contents.
I figured it was a silly mistake.
I did a proc contents and matched the variable type 🙂
Thanks so much guys.
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.
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.