SELECT Sum(SumCount) AS TotalCount FROM(
SELECT COUNT(*) AS SumCount FROM IFSP01.COUNTER000
where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter001 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter002 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter003 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter004 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter005 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter006 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter007 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter008 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter009 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter010 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter011 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter012 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter013 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter014 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter015 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter016 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter017 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter018 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss') union
select count(*) from counter019 where serverid=2 and timestamp<to_timestamp('12-06-2017 00:00:00', 'dd-mm-yyyy hh24:mi:ss'))dt;
当我在shell脚本中传递此查询并通过sqlplus模式执行时,我收到一条错误,指出行数很高,因此无法执行,我们可以将查询更改为具有更少的行数吗? / p>