- 浏览: 280182 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (251)
- 面试基础 (9)
- java基础 (40)
- 调试配置 (10)
- 转载文章 (4)
- 心灵鸡汤 (8)
- java工具 (6)
- CSS学习 (7)
- css案例 (2)
- 经济 (1)
- 小节惹的祸 (1)
- 实例心得 (21)
- 数据库 (7)
- 有用的代码 (17)
- Struts (3)
- Hibernate (5)
- Spring (3)
- java xml (7)
- Java Reflection API (1)
- 网络配置 (4)
- SSH (8)
- java开源框架 (13)
- ajax (4)
- swing (1)
- 设计模式 (1)
- 未主流组件 (7)
- WebService (6)
- 20111019 (1)
- xiao清讲课笔笔~~~UML (0)
- 笔记 (2)
- SOAP (9)
- 第一天遇到的问题 (1)
- Java Card (3)
- 面试 (18)
- Java (17)
- JNLP 集群 (0)
- java 面试 (3)
最新评论
-
ap0406708:
138XXXXXXXX
webserivce spring-ws 安全 -
yezhuzhe:
...
[code]SSH上传下载 ------温故知新 -
thinking_ou:
怎么需要解压密码
webserivce spring-ws 安全 -
ap0406708:
uuu999ggg 写道连return都写错了
try catch finally 块 与 函数的return -
wst0350:
...
java正则表达式,js正则表达式
select * from (
select s1.* ,s2.snap_file as oldpic from page_snapshot s1
left join page_snapshot s2
on s1.page_issue_id = s2.page_issue_id and
s2.snap_time<s1.snap_time
where s1.page_issue_id = 413
order by s1.snap_time desc, s2.snap_time desc
) where ROWNUM <= 1
1.
oldpic 写成'oldpic' 唔得
2.
s2.* 唔得,有同名
----------------------------------------------------
----------------------
第一
-----------------------------
select s1.page_issue_id,Max(s1.snap_time) as top1
from page_snapshot s1
group by s1.page_issue_id
-------------
第二
-----------------------------
select s1.page_issue_id,Max(s1.snap_time) as top2 from page_snapshot s1
where s1.snap_time < (select max(s2.snap_time) from page_snapshot s2
where s1.page_issue_id=s2.page_issue_id)
group by s1.page_issue_id
----------------------------
ok的
-----------------------------
select ra1.page_issue_id,ra1.top1,ra2.top2,
ps1.snap_file as newfile,ps2.snap_file as oldfile,
ps1.make_file,ps1.make_step,ps1.make_message from
(
select s1.page_issue_id,Max(s1.snap_time) as top1
from page_snapshot s1
group by s1.page_issue_id
) ra1
left join
(
select s1.page_issue_id,Max(s1.snap_time) as top2 from
page_snapshot s1
where s1.snap_time < (select max(s2.snap_time) from
page_snapshot s2
where s1.page_issue_id=s2.page_issue_id)
group by s1.page_issue_id
) ra2
on ra1.page_issue_id= ra2.page_issue_id
left join page_snapshot ps1
on ra1.page_issue_id= ps1.page_issue_id
and ra1.top1 = ps1.snap_time
left join page_snapshot ps2
on ra2.page_issue_id = ps2.page_issue_id
and ra2.top2 = ps2.snap_time
----------------------
OK OK
------------------------------
select ra1.page_issue_id,ra1.top1,ra2.top2,
ps1.snap_file as newfile,ps2.snap_file as oldfile,
ps1.make_file,ps1.make_step,ps1.make_message from
(
select s1.page_issue_id,Max(s1.snap_time) as top1
from page_snapshot s1
group by s1.page_issue_id
) ra1
left join
(
select s1.page_issue_id,Max(s1.snap_time) as top2 from
page_snapshot s1
where s1.snap_time < (select max(s2.snap_time) from
page_snapshot s2
where s1.page_issue_id=s2.page_issue_id)
group by s1.page_issue_id
) ra2
on ra1.page_issue_id= ra2.page_issue_id
inner join page_snapshot ps1
on ra1.page_issue_id= ps1.page_issue_id
and ps1.make_step=0
and ra1.top1 = ps1.snap_time
inner join page_snapshot ps2
on ra2.page_issue_id = ps2.page_issue_id
and ra2.top2 = ps2.snap_time
----------------------
OK OK
------------------------------
select ra1.page_issue_id,ra1.top1,ra2.top2,
ps1.snap_file as newfile,ps2.snap_file as oldfile,
ps1.make_file,ps1.make_step,ps1.make_message from
(
select s1.page_issue_id,Max(s1.snap_time) as top1
from page_snapshot s1
group by s1.page_issue_id
) ra1
left join
(
select s1.page_issue_id,Max(s1.snap_time) as top2 from
page_snapshot s1
where s1.snap_time < (select max(s2.snap_time) from
page_snapshot s2
where s1.page_issue_id=s2.page_issue_id)
group by s1.page_issue_id
) ra2
on ra1.page_issue_id= ra2.page_issue_id
inner join page_snapshot ps1
on ra1.page_issue_id= ps1.page_issue_id
//and ps1.make_step=0
and ra1.top1 = ps1.snap_time
inner join page_snapshot ps2
on ra2.page_issue_id = ps2.page_issue_id
and ra2.top2 = ps2.snap_time
where ps1.make_step=0
============================================================
取所有未生成过的,不只是最新的版本
========================================================
----------------------------
select t1.page_issue_id,t1.snap_time,Max(t2.snap_time) as top2 from page_snapshot t1 left join page_snapshot t2
on t1.page_issue_id = t2.page_issue_id and t2.snap_time < t1.snap_time
group by t1.page_issue_id,t1.snap_time
p1 top1 top2
p1 top2 top3
p2 top1 top2
!!! lefe join 改 inner join 不然 top2会空
------------------------
------------------------------
select ra1.page_issue_id,ra1.top1,ra1.top2,ra2.snap_file as newfile ,ra2.make_step,ra2.make_file,ra2.make_message,ra3.snap_file as oldfile from
(
select t1.page_issue_id,t1.snap_time as top1,Max(t2.snap_time) as top2 from page_snapshot t1 left join page_snapshot t2
on t1.page_issue_id = t2.page_issue_id and t2.snap_time < t1.snap_time
group by t1.page_issue_id,t1.snap_time
)ra1
left join
(
select * from page_snapshot t1
)ra2
on ra1.page_issue_id = ra2.page_issue_id
and ra1.top1 = ra2.snap_time
left join
(
select t1.page_issue_id,t1.snap_time,t1.snap_file from page_snapshot t1
)ra3
on ra1.page_issue_id = ra3.page_issue_id
and ra1.top2 = ra3.snap_time
where ra2.make_step=0 and ra1.top1 > to_date('2010-11-09','yyyy-mm-dd')
------------------------
select ra1.page_issue_id,ra1.top1,ra1.top2,ra2.snap_file as newfile, ra2.make_step,ra2.make_file,ra2.make_message,ra3.snap_file as oldfile from
(
select t1.page_issue_id,t1.snap_time as top1,Max(t2.snap_time) as top2
from page_snapshot t1
left join page_snapshot t2
on t1.page_issue_id = t2.page_issue_id and t2.snap_time < t1.snap_time
group by t1.page_issue_id,t1.snap_time
)ra1
left join
(select * from page_snapshot t1 )ra2
on ra1.page_issue_id = ra2.page_issue_id and ra1.top1 = ra2.snap_time
left join
(select t1.page_issue_id,t1.snap_time,t1.snap_file from page_snapshot t1 )ra3
on ra1.page_issue_id = ra3.page_issue_id
and ra1.top2 = ra3.snap_time
where ra2.make_step=0
and ra1.top1 > to_date('2010-11-08 12:57:30','yyyy-MM-dd HH24:mi:ss')
select s1.* ,s2.snap_file as oldpic from page_snapshot s1
left join page_snapshot s2
on s1.page_issue_id = s2.page_issue_id and
s2.snap_time<s1.snap_time
where s1.page_issue_id = 413
order by s1.snap_time desc, s2.snap_time desc
) where ROWNUM <= 1
1.
oldpic 写成'oldpic' 唔得
2.
s2.* 唔得,有同名
----------------------------------------------------
----------------------
第一
-----------------------------
select s1.page_issue_id,Max(s1.snap_time) as top1
from page_snapshot s1
group by s1.page_issue_id
-------------
第二
-----------------------------
select s1.page_issue_id,Max(s1.snap_time) as top2 from page_snapshot s1
where s1.snap_time < (select max(s2.snap_time) from page_snapshot s2
where s1.page_issue_id=s2.page_issue_id)
group by s1.page_issue_id
----------------------------
ok的
-----------------------------
select ra1.page_issue_id,ra1.top1,ra2.top2,
ps1.snap_file as newfile,ps2.snap_file as oldfile,
ps1.make_file,ps1.make_step,ps1.make_message from
(
select s1.page_issue_id,Max(s1.snap_time) as top1
from page_snapshot s1
group by s1.page_issue_id
) ra1
left join
(
select s1.page_issue_id,Max(s1.snap_time) as top2 from
page_snapshot s1
where s1.snap_time < (select max(s2.snap_time) from
page_snapshot s2
where s1.page_issue_id=s2.page_issue_id)
group by s1.page_issue_id
) ra2
on ra1.page_issue_id= ra2.page_issue_id
left join page_snapshot ps1
on ra1.page_issue_id= ps1.page_issue_id
and ra1.top1 = ps1.snap_time
left join page_snapshot ps2
on ra2.page_issue_id = ps2.page_issue_id
and ra2.top2 = ps2.snap_time
----------------------
OK OK
------------------------------
select ra1.page_issue_id,ra1.top1,ra2.top2,
ps1.snap_file as newfile,ps2.snap_file as oldfile,
ps1.make_file,ps1.make_step,ps1.make_message from
(
select s1.page_issue_id,Max(s1.snap_time) as top1
from page_snapshot s1
group by s1.page_issue_id
) ra1
left join
(
select s1.page_issue_id,Max(s1.snap_time) as top2 from
page_snapshot s1
where s1.snap_time < (select max(s2.snap_time) from
page_snapshot s2
where s1.page_issue_id=s2.page_issue_id)
group by s1.page_issue_id
) ra2
on ra1.page_issue_id= ra2.page_issue_id
inner join page_snapshot ps1
on ra1.page_issue_id= ps1.page_issue_id
and ps1.make_step=0
and ra1.top1 = ps1.snap_time
inner join page_snapshot ps2
on ra2.page_issue_id = ps2.page_issue_id
and ra2.top2 = ps2.snap_time
----------------------
OK OK
------------------------------
select ra1.page_issue_id,ra1.top1,ra2.top2,
ps1.snap_file as newfile,ps2.snap_file as oldfile,
ps1.make_file,ps1.make_step,ps1.make_message from
(
select s1.page_issue_id,Max(s1.snap_time) as top1
from page_snapshot s1
group by s1.page_issue_id
) ra1
left join
(
select s1.page_issue_id,Max(s1.snap_time) as top2 from
page_snapshot s1
where s1.snap_time < (select max(s2.snap_time) from
page_snapshot s2
where s1.page_issue_id=s2.page_issue_id)
group by s1.page_issue_id
) ra2
on ra1.page_issue_id= ra2.page_issue_id
inner join page_snapshot ps1
on ra1.page_issue_id= ps1.page_issue_id
//and ps1.make_step=0
and ra1.top1 = ps1.snap_time
inner join page_snapshot ps2
on ra2.page_issue_id = ps2.page_issue_id
and ra2.top2 = ps2.snap_time
where ps1.make_step=0
============================================================
取所有未生成过的,不只是最新的版本
========================================================
----------------------------
select t1.page_issue_id,t1.snap_time,Max(t2.snap_time) as top2 from page_snapshot t1 left join page_snapshot t2
on t1.page_issue_id = t2.page_issue_id and t2.snap_time < t1.snap_time
group by t1.page_issue_id,t1.snap_time
p1 top1 top2
p1 top2 top3
p2 top1 top2
!!! lefe join 改 inner join 不然 top2会空
------------------------
------------------------------
select ra1.page_issue_id,ra1.top1,ra1.top2,ra2.snap_file as newfile ,ra2.make_step,ra2.make_file,ra2.make_message,ra3.snap_file as oldfile from
(
select t1.page_issue_id,t1.snap_time as top1,Max(t2.snap_time) as top2 from page_snapshot t1 left join page_snapshot t2
on t1.page_issue_id = t2.page_issue_id and t2.snap_time < t1.snap_time
group by t1.page_issue_id,t1.snap_time
)ra1
left join
(
select * from page_snapshot t1
)ra2
on ra1.page_issue_id = ra2.page_issue_id
and ra1.top1 = ra2.snap_time
left join
(
select t1.page_issue_id,t1.snap_time,t1.snap_file from page_snapshot t1
)ra3
on ra1.page_issue_id = ra3.page_issue_id
and ra1.top2 = ra3.snap_time
where ra2.make_step=0 and ra1.top1 > to_date('2010-11-09','yyyy-mm-dd')
------------------------
select ra1.page_issue_id,ra1.top1,ra1.top2,ra2.snap_file as newfile, ra2.make_step,ra2.make_file,ra2.make_message,ra3.snap_file as oldfile from
(
select t1.page_issue_id,t1.snap_time as top1,Max(t2.snap_time) as top2
from page_snapshot t1
left join page_snapshot t2
on t1.page_issue_id = t2.page_issue_id and t2.snap_time < t1.snap_time
group by t1.page_issue_id,t1.snap_time
)ra1
left join
(select * from page_snapshot t1 )ra2
on ra1.page_issue_id = ra2.page_issue_id and ra1.top1 = ra2.snap_time
left join
(select t1.page_issue_id,t1.snap_time,t1.snap_file from page_snapshot t1 )ra3
on ra1.page_issue_id = ra3.page_issue_id
and ra1.top2 = ra3.snap_time
where ra2.make_step=0
and ra1.top1 > to_date('2010-11-08 12:57:30','yyyy-MM-dd HH24:mi:ss')
发表评论
-
从安全和体验上解析移动App的登录
2016-03-02 11:00 652从安全和体验上解析移动App的登录 http://blog.c ... -
hwpf POI
2010-11-13 14:19 1130样式集 StyleSheet styleSheet = hwp ... -
java 注解~~~
2010-11-05 16:00 862/** * 下载文件流 * @param re ... -
为什么JAVA要提供 wait/notify 机制?是为了避免轮询带来的性能损失
2010-10-20 17:43 973/* *分析synchronized方法 *s ... -
spring 容器
2010-10-11 10:43 793WebApplicationContext wac = ... -
barcode4j demo
2010-09-25 17:51 1013demo~~~~~~~ -
java 转义字符
2010-09-19 14:33 991public class testWord { p ... -
Spring Security 网址
2010-08-02 16:44 857Spring Security 参考文档 [url]h ... -
单点登录(Single Sign On) SSO
2010-08-02 15:31 811编写你自己的单点登录(SSO)服务 http://blog.c ... -
POI 生成excel文件
2010-08-02 11:16 1030package com.zhao.poi.test; ... -
java调用本地方法,java与C,C++互调
2010-07-28 10:48 1252JNI Java Native Interface http ... -
用户权限管理模块设计
2010-06-15 11:24 1245用户权限管理模块设计 http://wenku.baidu. ... -
Flex
2010-05-26 14:26 653http://www.blogjava.net/bolo/ar ... -
好垃圾本书中好有用的两个存储过程
2010-05-12 14:52 764来源: SQL动态交叉表 http://blog.csdn.n ... -
jasperreports 与 iReport
2010-04-28 15:10 8961. jasperreports 是生成报表的组件, 其中 ... -
ANT 命令
2010-04-28 14:27 10811. ant 默认命令 2. ant -p 查看所有 ... -
java编译 ant
2010-04-28 10:36 793Tutorial: Hello World with Ant ... -
java如系统环境变量和bat设环境变量
2010-04-27 15:59 2543java_home.bat wmic ENVIRONMEN ... -
网站VS系统
2010-02-07 09:56 987http://www.yingshengxs.com/cn/s ... -
运行jar文件
2009-12-20 01:02 685java -jar *.jar
相关推荐
##通过sqlcmd执行sql文件 由于sql文件过大,超过了100M,再数据库的窗口执行,结果超出内存了,对于特别大的sql文件可以使用sqlcmd进行执行 ###1.打开cmd窗口 运行–cmd–进入到sql文件所在的文件夹。 如果是win7可...
java sql操作工具类 java sql操作工具类java sql操作工具类 java sql操作工具类java sql操作工具类 java sql操作工具类java sql操作工具类 java sql操作工具类java sql操作工具类 java sql操作工具类java sql操作...
在我个人编写SQL脚本时,至少会把SQL的格式排列成易于阅读的,因为其他人会阅读到你的SQL,无论是在程序中或是脚本文件中,良好的排版不仅让人看起来赏心悦目,在和他人之间做交流时也省时省力,不会因为揉成一团的...
SQL优化是数据库管理中的关键环节,它涉及到提升查询性能、减少资源消耗以及改善系统整体效率。SQL优化软件和工具能够帮助数据库管理员(DBA)和开发人员找出性能瓶颈,优化查询逻辑,从而提高数据库系统的响应速度...
本人在Windows7 64位+SQL Server 2012环境下测试通过(系统是全新安装) 使用方法: 1,安装SQLPrompt v5.3,这个不多说。 2,安装完毕后,断开网络连接。 3,打开Visual Studio或者SQL Server Management Studio(版本...
SQLPrompt for SQLServer2016 智能提示插件 SQL2016 提示 SQLPrompt最新版本 绿色版 SQL Prompt 是一款拥有SQL智能提示功能的SQL Server和VS插件。SQL Prompt能根据数据库的对象名称,语法和用户编写的代码片段自动...
在IT行业中,数据库管理系统是核心组成部分,SQL Server和Oracle分别是微软和甲骨文公司推出的两款广泛应用的关系型数据库系统。在企业级应用中,有时需要在不同的数据库系统间进行数据迁移或兼容性处理,这就涉及到...
SQL Server 导入超大 SQL 脚本文件 SQL Server 是一种关系型数据库管理系统,广泛应用于各种行业。然而,在实际应用中,我们经常会遇到导入超大 SQL 脚本文件的问题。本文将介绍如何使用 osql 工具来导入超大 SQL ...
在Android开发中,有时我们需要与远程数据库进行交互,例如SQLServer。这个场景通常是通过Web服务,如WebService来实现。本文将详细介绍如何在Android应用中利用WebService接口连接到SQLServer数据库,实现数据的增...
SQL Prompt是Redgate Software开发的一款高效SQL代码编辑工具,它为SQL Server的开发人员提供了智能提示、格式化、重构和代码分析等功能,极大地提升了编写和维护SQL代码的效率。SQL Prompt 9是该系列的最新版本,...
SQL 基础 SQL 首页 SQL 简介 SQL 语法 SQL select SQL distinct SQL where SQL AND & OR SQL Order By SQL insert SQL update SQL delete SQL 高级 SQL Top SQL Like SQL 通配符 SQL In SQL Between ...
《SQLMonitor:Oracle数据库SQL跟踪与分析利器》 在IT行业中,数据库的高效管理与优化是至关重要的。针对Oracle数据库,有一款名为SQLMonitor的工具,它专为跟踪和监控SQL语句而设计,帮助开发者和DBA们找出程序...
Sql Server 2014 安装包 SQL Server 2014是微软推出的一款关系型数据库管理系统,它在企业级数据管理和分析领域扮演着重要的角色。此安装包包含两个主要组件:SQL Management Studio和SQL Server Express。 1. **...
开源的AI自动生成SQL语句源代码,这款SQLCoder-70B-Alpha在文本到SQL的转换能力上超越了包括GPT-4在内的所有通用模型,它能更准确地理解你的需求,并生成相应的SQL查询。SQLCoder2和SQLCoder-7B模型已经向公众开放,...
SQL Server驱动包是用于Java应用程序通过JDBC(Java Database Connectivity)接口与Microsoft SQL Server数据库进行交互的必备组件。本文将详细介绍这两个重要的驱动文件——sqljdbc.jar和sqljdbc4.jar,以及如何...
SQL Server驱动包`sqljdbc4.jar`是微软官方提供的Java数据库连接器(JDBC),用于在Java应用程序中与Microsoft SQL Server进行通信。JDBC是Java编程语言中的一个标准API,它使得开发人员能够以标准化的方式访问各种...
标题中的"sqlservr32和sqlservr64.zip"指的是SQL Server 2005服务中的两个关键组件,`sqlservr32.exe`和`sqlservr64.exe`。这两个文件是SQL Server服务的核心执行文件,分别对应于32位和64位操作系统。在Windows 8和...
SQLTracker是一款专为数据库操作监控设计的工具,它在IT领域中主要用于跟踪和记录SQL语句的执行情况。SQL(Structured Query Language)是用于管理关系数据库的编程语言,包括查询、更新、插入和删除数据等操作。SQL...
解决oracle sqldeveloper无法连接mysql、SQLServer问题,sqlDeveloper是ORACLE数据库开发工具,自带的是无法连接MS SQL Server以及mysql的,想连接的话需要第三方工具。 使用方法: 解压出来后将2个jar放入jlib...
在数据库管理领域,Oracle SQL和MySQL SQL是两种广泛使用的SQL方言,它们在语法和功能上存在一定的差异。当需要将一个基于Oracle SQL的应用程序迁移到MySQL环境时,就需要进行SQL语句的转换工作。本项目提供了一个...