04-04-2014 12:48 PM
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!
04-04-2014 12:58 PM
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
04-04-2014 01:08 PM
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.
04-04-2014 01:53 PM
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
04-04-2014 01:56 PM
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