Why is this warnng message displayed?
create table cell_phone
79 as
80 select
81 a.GALC_ACCT_NO as acct_no
82 ,compress(a.GALC_ALRT_PHONE_NO,'-') as cell_nbr
83 from outdata.DMGADR_171212 a
84 join (
85 select
86 b.GALC_ACCT_NO
87 ,max(GALC_LST_UPDT_TS) as last_updt_dt
88 from outdata.DMGADR_171212 b
89 where coalesce(b.GALC_ADDR_TYPE_CD,'')='PHN'
90 and b.GALC_ALRT_PHONE_NO is not null
91 and input(compress(b.GALC_ALRT_PHONE_NO,'-'),10.) > 0
92 group by b.GALC_ACCT_NO
93 ) b on a.GALC_ACCT_NO=b.GALC_ACCT_NO and a.GALC_LST_UPDT_TS=b.last_updt_dt
94 where coalesce(a.GALC_ADDR_TYPE_CD)='PHN'
95 and a.GALC_ALRT_PHONE_NO is not null
96 and input(compress(a.GALC_ALRT_PHONE_NO,'-'),10.) > 0
97 ;
WARNING: INPUT function reported 'WARNING: Illegal first argument to function' while processing WHERE clause.
WARNING: INPUT function reported 'WARNING: Illegal first argument to function' while processing WHERE clause.
WARNING: INPUT function reported 'WARNING: Illegal first argument to function' while processing WHERE clause.
You should use coalescec( ) for character variable, coalesce() is for numeric variable.
but the warning is related to input function.
Have you tried input(compress(b.GALC_ALRT_PHONE_NO,'','KD')) ? 'KD' will keep only numeric characters. There may be other delimiters in your phone data.
Richard in Oz
Will try that!
Thanks.
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 16. 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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: