解决方案 »
- 求助一个两行整合到一行sql,两天了没有写出来
- 存储过程中怎么调整out型参数查看结果
- 求助:-) oracle 一个查询的问题。
- ----------出资-----出资----------请高手安装配置数据库集群
- 各位大侠!!!!!! 谁有TOAD for DB2 的注册码?
- ORA-00604错误如何解决?
- 我是菜鸟,想学oracle数据库,听说要用java开发,不知从何学起,请大侠指教!多谢
- 问几个基础问题。100分,只想知道准确答案。
- 一个select语句该怎么写
- oracle10g连接报12505
- Oracle 中输出语句 可以执行编译,没有报错,但是输出看不到,显示匿名块以完成。
- 请问谁了解weblogic集群的单点传送和多点传送机制么?
select count(case when order <10 then 1 end) less_10,
count(case when order >=10 and order<20 then 1 end) between_10_20,
count(case when order>=20 then 1 end) more_20
from table;
抱歉哈,咱是菜鸟小白。
我是写在sh文件里面:
#!/bin/shsqlplus -S /nolog <<EOF
set heading off feedback off pagesize 0 verify off echo off numwidth 6
conn comesa/lUft9SkrGb
select count(case when order <10 then 1 end) less_10,
count(case when order >=10 and order<20 then 1 end) between_10_20,
count(case when order>=20 then 1 end) more_20
from table;
exit
EOF不晓得less_10, between_10_20,more_20能不能在 EOF后面shell内使用,还是只能在EOF 之前使用。
我试试看哈。
多谢