⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 run.sql

📁 本人在工程上收集的比较常用的oracle sql语句 有问题请发email:leafboyman@tom.com
💻 SQL
字号:
	SET ECHO      OFF;
	SET FEEDBACK  OFF;
	SET VERIFY    OFF;
	SET PAGESIZE  0;
	SET TERMOUT   ON;
	SET HEADING   OFF;
	echo SET LINESIZE  355;

	spool result.txt;
	--echo 手机号 时间 归属地 漫游地
	select history.condition,history.msisdn,to_char(history.stime,'yyyy-mm-dd hh24:mi:ss'),tc.name||'->'||city.name,condition.msg
	 from history,city,city tc,vlr,no,condition 
	where history.condition in(105,104)--设置要查询的消息ID
	and history.stime>sysdate-0.3 --设置时间范围
	and history.stime<sysdate-0.25
	and city.id=vlr.city_id and history.vlr=vlr.id
	and tc.id=no.city_id and trunc(mod(history.msisdn,1000000000)/10000)=no.id
	and history.errorcode=0
	and condition.id=history.condition
	order by history.condition,history.stime;

	spool off;
quit

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -