zoukankan      html  css  js  c++  java
  • ORA-00913:值过多

      select distinct(daima),decode(daima,'1','上海青','2','白萝卜','3','小白菜','4','西红柿','5','土豆','6','黄瓜','7','薄皮青椒','8','茄子','9','四季豆','10','芹菜','11','包菜','12','洋葱','13','冬瓜','14','花菜','15','大白菜','16','生菜','17','胡萝卜','18','藕','') as cm,
    ( select a.daima as 代码, avg(case when i.so_instance_code = 'pjcd01' then field1 end) 价格
      from dyna_dataset_nfcp_range1 a, rpt7_reportinstance i, Rpt7_ReportPeriod d where r.reportinstance_guid = i.reportinstance_guid
      and i.template_guid = 'AC100142FFFFFFFF8E6F8CAF00001075'and i.verifystatus >= 0 and substr(d.reportperiod_code, 5, 7) = '2012-01' and a.daima=f.daima )as field1
      from dyna_dataset_nfcp_range1 f group by to_number(daima)
    ORA-00913:值过多
    你的子查询返回的值多了,你都返回2个值了
    就是这个
    ( select a.daima as 代码, avg(case when i.so_instance_code = 'pjcd01' then field1 end) 价格
      from dyna_dataset_nfcp_range1 a, rpt7_reportinstance i, Rpt7_ReportPeriod d where r.reportinstance_guid = i.reportinstance_guid
      and i.template_guid = 'AC100142FFFFFFFF8E6F8CAF00001075'and i.verifystatus >= 0 and substr(d.reportperiod_code, 5, 7) = '2012-01' and a.daima=f.daima )as field1
     
     
  • 相关阅读:
    LeetCode --- Roman to Integer
    LeetCode --- Maximum Depth of Binary Tree
    LeetCode --- Minimum Path Sum
    Hashkell 第一篇
    LeetCode --- Partition List
    LeetCode --- Valid Palindrome
    LeetCode --- Longest Consecutive Sequence
    LeetCode --- Insertion Sort List
    数据库lib7第2, 3题(创建索引和触发器)
    LeetCode --- Reverse Integer
  • 原文地址:https://www.cnblogs.com/weixun/p/3292516.html
Copyright © 2011-2022 走看看