Hi all,
I have one of those errors that I should be easily able to figure out, but for some reason my brain just isn't working today.
Can one of you please help me find the problem with the second data step?
FYI - I am using a format statement without setting any formats.
The purpose of this is to put the fields in the order I want to view them within the data table.
This is working for all of the fields that I rename except one.
Please see the attached pdf for details.
Thanks SO MUCH and TGIF!
Barb
Hi,
If I'm right, you are not pulling in claim_id into the miami_claims table. You have select * in your connection but I do not see claim_id in your native select.
create table work.miami_claims as select * from connection to odbc
"claim_id ln_num" be "claim_num ln_num"
I am getting a little bit confused, possible has the language processor also got confused ion the same way.
The rename of variables is done at the output (data) not at the input (set) statement.
The format off all variables is done with the naming of the output but defined at the PDV processing.
The processing (claimadj CLM_NUM) is done of the input dataset but the warning is coming from the to be renamed one.
You can save yourself some typing time by letting SQL align and rename your variables. Instead of writing
"create table work.miami_claims as select * from connection to odbc "
you can write
create table work.miami_claims as
select fromvar1 as myfirstreorderedrenamedvar,
fromvar2 as mysecondreorderedrenamedvar,
etc... as etcreorderedrenamedvar
from connection to odbc
you could also place the code below in your sql statement to replace what you are creating in your datastep:
compress(trim(CLM_NUM)||'|'||trim(put(ln_num,4.))||'|'||put(pd_dt,mmddyy6.)||'|'730! ||trim(put(ELGBL_CHRG_AMT,20.2)),' '); as claimadj length=200
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.