DATA Step, Macro, Functions and more

Warning message

Reply
Super Contributor
Posts: 647

Warning message

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.

Super User
Posts: 9,662

Re: Warning message

You should use coalescec( ) for character variable, coalesce() is for numeric variable.

Super Contributor
Posts: 647

Re: Warning message

but the warning is related to input function.

Super Contributor
Posts: 644

Re: Warning message

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

Super Contributor
Posts: 647

Re: Warning message

Will try that!

Thanks.

Ask a Question
Discussion stats
  • 4 replies
  • 692 views
  • 1 like
  • 3 in conversation