proc sql;
create table cr_postpay2a(
charged_party_number char(11)
,SiteID char(10)
,Site_Name char(250)
,Band char(5)
,Address char(150)
,Post_Code num
,Locality char(50)
,hours_flag char(20)
,calls num
,total_calls num
,calls_percentage num format=percent4.2
)
/*optional plus index here */
;
proc sql;
insert into cr2_postpay2a
select
charged_party_number
,SiteID
,Site_Name
,Band
,Address
,Post_Code
,Locality
,hours_flag
,sum(calls) as calls
,null
,null
from
cr_postpay a
,tdb.site_and_cell_lookup b
where
a.first_cell_id=b.Voice_Cell_ID
group by 1,2,3,4,5,6,7,8;
proc sql;
create table cr_postpay2b as (
select
charged_party_number
,hours_flag
,sum(calls) as calls
from cr_postpay
group by 1,2
)
;
proc sql;
update cr_postpay2a
set total_calls=cr_postpay2b.calls
where cr_postpay2a.charged_party_number
=cr_postpay2b.charged_party_number
and cr_postpay2a.hours_flag=cr_postpay2b.hours_flag
;
the error is in red colour :
ERROR: total_calls, a numeric column, can only be updated with a numeric expression.
anyone knows hot to solve?thank you very much