全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1825 0
2012-01-06
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
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群