同一个sql,在PLSQL/Developer里面能查出数据,粘贴到数据集里面报【无效数字】

同一个sql,在PLSQL/Developer里面能查出数据,粘贴到数据集里面报【无效数字】,求解
FineReportwiseM__花生丶 发布于 2016-7-29 11:52
悬赏:2 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共6回答
最佳回答
0
yets11发布于2016-7-29 11:52(编辑于 2023-9-6 09:34)
555
最佳回答
0
静听禅鸣发布于2016-7-29 11:53(编辑于 2023-9-6 09:34)
555
  • wiseM__花生丶 wiseM__花生丶(提问者)

    SELECT
    DL.CJNAME as JG--DL.CJNAME,DL.BZNAME
    ,SUM(DL16_1.DL16GDNL) AS S21,COUNT(DL16_1.DLOID) AS S22,SUM(DL16_2.DL16GDNL) S23,COUNT(DL16_2.DLOID) S24,SUM(DL16_3.DL16GDNL) AS S25,COUNT(DL16_3.DLOID) AS S26,SUM(DL16_4.DL16GDNL) AS S27,COUNT(DL16_4.DLOID) AS S28,COUNT(DL16_5.DLOID) AS S29,COUNT(DL16_6.DLOID) AS S30
    ,SUM(DL24.DL24GL) AS S31,COUNT(DL24.DLOID) AS S32
    ,COUNT(DL9_1.DLOID) AS S126,COUNT(DL9_2.DLOID) AS S127,COUNT(DL9_3.DLOID) AS S128
    ,COUNT(DL19_1.DLOID) AS S131,COUNT(DL19_2.DLOID) AS S132,COUNT(DL19_3.DLOID) AS S133
    ,COUNT(DL23_1.DLOID) AS S141,COUNT(DL23_2.DLOID) AS S142,COUNT(DL23_3.DLOID) AS S143
    ,COUNT(DL22_1.DLOID) AS S146,COUNT(DL22_2.DLOID) AS S147,COUNT(DL22_3.DLOID) AS S148
    ,COUNT(DL11_1.DLOID) AS S151,COUNT(DL11_2.DLOID) AS S152,COUNT(DL11_3.DLOID) AS S153
    ,COUNT(DL14_1.DLOID) AS S156,COUNT(DL14_2.DLOID) AS S157,COUNT(DL14_3.DLOID) AS S158
    ,COUNT(DL12_1.DLOID) AS S161,COUNT(DL12_2.DLOID) AS S162,COUNT(DL12_3.DLOID) AS S163
    ,COUNT(DL13_1.DLOID) AS S166,COUNT(DL13_2.DLOID) AS S167,COUNT(DL13_3.DLOID) AS S168
    ,COUNT(DL26_1.DLOID) AS S177,COUNT(DL26_2.DLOID) AS S178,COUNT(DL26_3.DLOID) AS S179
    ,SUM(DL34_1.DL34JZMJ) AS S183,SUM(DL34_2.DL34JZMJ) AS S184,SUM(DL34_3.DL34JZMJ) AS S185,SUM(DL34_4.DL34JZMJ) AS S186 ,SUM(DL34_5.DL34JZMJ) AS S187  
    ,SUM(DL34_1.DL34ZDMJ) AS S188,SUM(DL34_2.DL34ZDMJ) AS S189,SUM(DL34_3.DL34ZDMJ) AS S190,SUM(DL34_4.DL34ZDMJ) AS S191 ,SUM(DL34_5.DL34ZDMJ) AS S192
    FROM
    EMIS_DLDEV_REPORT DL
    ,(SELECT DLOID,dl16gdnl FROM EMIS_DLDEV_REPORT WHERE DEVTYPE=\'DL16\' AND DL16LX LIKE \'发电所\') DL16_1
    ,(SELECT DLOID,dl16gdnl FROM EMIS_DLDEV_REPORT WHERE DEVTYPE=\'DL16\' AND DL16LX LIKE \'变电所\') DL16_2
    ,(SELECT DLOID,dl16gdnl FROM EMIS_DLDEV_REPORT WHERE DEVTYPE=\'DL16\' AND DL16LX LIKE \'配电所\') DL16_3
    ,(SELECT DLOID,dl16gdnl FROM EMIS_DLDEV_REPORT WHERE DEVTYPE=\'DL16\' AND DL16LX LIKE \'车间变电所\') DL16_4
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE DEVTYPE=\'DL16\' AND DL16LX LIKE \'开闭所\') DL16_5
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE DEVTYPE=\'DL16\' AND DL16LX LIKE \'箱变\') DL16_6
    ,(SELECT DLOID,DL24GL FROM EMIS_DLDEV_REPORT DL24 WHERE DEVTYPE=\'DL24\' AND DL24SBMC=\'发电车\') DL24
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL9\' AND JDRESULT!=NULL) DL9_1
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL9\' AND JDRESULT in (\'优良\',\'合格\')) DL9_2
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL9\' AND JDRESULT in (\'优良\')) DL9_3
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL19\' AND JDRESULT!=NULL) DL19_1
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL19\' AND JDRESULT in (\'优良\',\'合格\')) DL19_2
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL19\' AND JDRESULT in (\'优良\')) DL19_3
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL23\' AND JDRESULT!=NULL) DL23_1
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL23\' AND JDRESULT in (\'优良\',\'合格\')) DL23_2
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL23\' AND JDRESULT in (\'优良\')) DL23_3
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL22\' AND JDRESULT!=NULL) DL22_1
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL22\' AND JDRESULT in (\'优良\',\'合格\')) DL22_2
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL22\' AND JDRESULT in (\'优良\')) DL22_3
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL11\' AND JDRESULT!=NULL) DL11_1
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL11\' AND JDRESULT in (\'优良\',\'合格\')) DL11_2
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL11\' AND JDRESULT in (\'优良\')) DL11_3
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL14\' AND JDRESULT!=NULL) DL14_1
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL14\' AND JDRESULT in (\'优良\',\'合格\')) DL14_2
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL14\' AND JDRESULT in (\'优良\')) DL14_3
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL12\' AND JDRESULT!=NULL) DL12_1
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL12\' AND JDRESULT in (\'优良\',\'合格\')) DL12_2
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL12\' AND JDRESULT in (\'优良\')) DL12_3
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL13\' AND JDRESULT!=NULL) DL13_1
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL13\' AND JDRESULT in (\'优良\',\'合格\')) DL13_2
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL13\' AND JDRESULT in (\'优良\')) DL13_3
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL26\' AND JDRESULT!=NULL) DL26_1
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL26\' AND JDRESULT in (\'优良\',\'合格\')) DL26_2
    ,(SELECT DLOID FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL26\' AND JDRESULT in (\'优良\')) DL26_3
    ,(SELECT DLOID,DL34JZMJ,DL34ZDMJ FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL34\' AND DL34LB=\'电力\') DL34_1
    ,(SELECT DLOID,DL34JZMJ,DL34ZDMJ FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL34\' AND DL34LB=\'电力\' AND DL34XZ=\'供电所\') DL34_2
    ,(SELECT DLOID,DL34JZMJ,DL34ZDMJ FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL34\' AND DL34LB=\'电力\' AND DL34XZ=\'电力工区\') DL34_3
    ,(SELECT DLOID,DL34JZMJ,DL34ZDMJ FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL34\' AND DL34LB=\'电力\' AND DL34XZ=\'变配电所\') DL34_4
    ,(SELECT DLOID,DL34JZMJ,DL34ZDMJ FROM EMIS_DLDEV_REPORT WHERE  DEVTYPE=\'DL34\' AND DL34LB=\'电力\' AND DL34XZ NOT IN (\'供电所\',\'电力工区\',\'变配电所\')) DL34_5
    WHERE
      1 = 1
    AND DL.DLOID=DL16_1.DLOID(+) AND DL.DLOID=DL16_2.DLOID(+) AND DL.DLOID=DL16_2.DLOID(+) AND DL.DLOID=DL16_3.DLOID(+) AND DL.DLOID=DL16_4.DLOID(+) AND DL.DLOID=DL16_5.DLOID(+) AND DL.DLOID=DL16_6.DLOID(+)
    AND DL.DLOID=DL24.DLOID(+)
    AND DL.DLOID=DL9_1.DLOID(+) AND DL.DLOID=DL9_2.DLOID(+) AND DL.DLOID=DL9_3.DLOID(+)
    AND DL.DLOID=DL19_1.DLOID(+) AND DL.DLOID=DL19_2.DLOID(+) AND DL.DLOID=DL19_3.DLOID(+)
    AND DL.DLOID=DL23_1.DLOID(+) AND DL.DLOID=DL23_2.DLOID(+) AND DL.DLOID=DL23_3.DLOID(+)
    AND DL.DLOID=DL22_1.DLOID(+) AND DL.DLOID=DL22_2.DLOID(+) AND DL.DLOID=DL22_3.DLOID(+)
    AND DL.DLOID=DL11_1.DLOID(+) AND DL.DLOID=DL11_2.DLOID(+) AND DL.DLOID=DL11_3.DLOID(+)
    AND DL.DLOID=DL14_1.DLOID(+) AND DL.DLOID=DL14_2.DLOID(+) AND DL.DLOID=DL14_3.DLOID(+)
    AND DL.DLOID=DL12_1.DLOID(+) AND DL.DLOID=DL12_2.DLOID(+) AND DL.DLOID=DL12_3.DLOID(+)
    AND DL.DLOID=DL13_1.DLOID(+) AND DL.DLOID=DL13_2.DLOID(+) AND DL.DLOID=DL13_3.DLOID(+)
    AND DL.DLOID=DL26_1.DLOID(+) AND DL.DLOID=DL26_2.DLOID(+) AND DL.DLOID=DL26_3.DLOID(+)
    AND DL.DLOID=DL34_1.DLOID(+) AND DL.DLOID=DL34_2.DLOID(+) AND DL.DLOID=DL34_3.DLOID(+) AND DL.DLOID=DL34_4.DLOID(+) AND DL.DLOID=DL34_5.DLOID(+)

    --AND DL.DLOID=DL16.DLOID(+) AND DL.DLOID=DL24.DLOID(+) AND DL.DLOID=DL9.DLOID(+)
    --AND DL.CJNAME = \'合肥西供电车间\'
    and DL.CJOID<>0 --DL.CJOID=123
    GROUP BY DL.CJNAME--DL.CJNAME,DL.BZNAME
    回复
    2016-07-29 11:54 
最佳回答
0
wiseM__花生丶发布于2016-7-29 11:54(编辑于 2023-9-6 09:34)
555
  • 土肥圆 土肥圆

    估计楼主你这个数据太大,你最好用存储过程
    回复
    2016-07-29 11:55 
最佳回答
0
土肥圆发布于2016-7-29 11:55(编辑于 2023-9-6 09:34)
555
最佳回答
0
静听禅鸣发布于2016-7-29 11:56(编辑于 2023-9-6 09:34)
555
  • 星痕 星痕

    哈哈哈哈{:9_227:}静静哥无语了
    回复
    2016-07-29 13:09 
最佳回答
0
wiseM__花生丶发布于2016-7-29 11:59(编辑于 2023-9-6 09:34)
555
最佳回答
0
wiseM__花生丶发布于2016-7-29 12:03(编辑于 2023-9-6 09:34)
555
  • macro_hard macro_hard

    DL.CJOID是什么类型的
    回复
    2016-07-29 12:09 
最佳回答
0
macro_hard发布于2016-7-29 12:09(编辑于 2023-9-6 09:34)
555
最佳回答
0
wiseM__花生丶发布于2016-7-29 12:12(编辑于 2023-9-6 09:34)
555
  • macro_hard macro_hard
    楼主显式转换一下数据类型再做<>比较试试
    回复
    2016-07-29 12:14 
  • macro_hard macro_hard

    还有就是 是不是DL.CJOID有null值导致sum count隐式转换数据类型时出错,改成isnull(DL.CJOID,\'0\')试试
    回复
    2016-07-29 12:20 
最佳回答
0
macro_hard发布于2016-7-29 12:14(编辑于 2023-9-6 09:34)
555
  • 0关注人数
  • 1879浏览人数
  • 最后回答于:2016-8-1 19:07
    活动推荐 更多
    热门课程 更多
    返回顶部