sql_update_仅更新高中学段科目仅一个记录为'Y'_for_stage
Update E_Subjectinfo A Set A.For_Stage='Y' Where A.rowid=(Select Max(B.rowid) From E_Subjectinfo B Where A.Subjectname=B.Subjectname And A.Teachstage=B.Teachstage) and a.teachst...
sql_case when_根据不同用户类型统计收藏记录数
Select x.usertype,count(x.favorityid) from (Select Case When A.Usertype=B.Loginid Then B.Nickname When A.Usertype=C.Loginid Then C.Nickname When A.Usert...
为开发人员编写每天凌晨2点运行一个存储过程_dbms_job
Create Or Replace Procedure P_O_Ins_Upd_ClassappraiseinfoAsBeginmerge into O_CLASSAPPRAISEINFO a using(select a.classid,count(b.appraise) commentnumber,count(distinct a.userid) engagednumber,ceil...
oracle left outer join(左联接)显示全部的课堂收藏信息
select * from o_classfavorityinfo f left outer join (select i.duration,i...
sqlloader导入_与导入源文件csv_txt_linux自动换行
由于编辑在提供导入的excel文件时,章节(列)当时没有进行合并列处理(属于excel操作).致使我在另存为txt(utf8)后,在windows7上看是正常的,是一行,但到linux一看.换成两行...
excel使用大全_转载
http://yingzizhu.blog.sohu.com/82979764.html
oracle sqlloader_控制文件_trailing nullcols小记
由于要导入到tmp_content表的一些列(列:要导入的源文件txt or csv文件)为空,也,按理讲我当时另存为(在windows处理)csv,以,分隔。就是这个列没有内容,也该显示, ,之类的。 ...
rhel5 more使用小记
详细用法: man more,好多我还不理解,先记下搞明白,用得上的东东 more +2 wu_li.txt ##从第2行开始显示more -s wu_li.txt ##如有多行空白行合并为一行,此非常有用more -d wu_li.txt&...
exp_imp_迁移_同用户_不同表空间的小记
概述 1,源系统:10.2.0.4 rhel5 for x86 目标系统:10.2.0.4 rhel5 for x86 2,源与目标系统的字符集及国家字符集一致,皆为utf8与alutf16 3,源系...
drop user pd cascade_小记
1,删除此用户与用户所创建的所有对象(表,索引,视图,sp,package,body and so on)2,但其他用户创建的引用此删除用户的相关对象(如:view等),只会标记为invalidate3,回收了此删除用户所占用表空间给os...
主子表drop table constraints cascade的测试
######建立主表及子表SQL> create table t_parent(a int primary key,b int);--采用内建约束方式Table created.SQL> create table t_child(a int primary key,parent int constraint fk_t_child references t_par...
oracle foreign key外键_更新主表对于子表三种行为控制
http://space.itpub.net/519536/viewspace-630034
oracle sun virtualbox使用小记
也是昨天无聊,在公司下载了这个小东东,以前就知道有人在用,功能和vmware一样。我分别下载了windows及linux两个版本的。 操作同vmware差不多。 &n...
转换windows xp的fat32为ntfs(文件系统fs)
http://support.microsoft.com/kb/307881/zh-cn
flashback as of 的一点小注解
conn scott/system03:32:38 SQL> select count(*) from tab as of scn(1726590);select count(*) from tab as of scn(1726590) &nbs...
securecrt同时操作多个会话窗口
1,选中:查看/交互窗口2,开启多个会话窗口3,右击任何一个会话窗口下面的交互窗口,选中:发送交互到所有标签 4,在交互窗口输入命令,就会同时在多个会话窗口执行了!...
merge into汇总插入更新_insert_update到课堂评分表
为了实现定期job从课堂参与表汇总数据到课堂评分表,如在目标表没有数据,就插入,否则更新,查阅语法,采用如下方法 merge into O_CLASSAPPRAISEINFO a using(select a.classid,count(b.apprais...
sql_update_以学段为单位只更新每个学科第一条记录的for_stage为y
##以学段为单位只更新每个学科第一条记录的for_stage为yupdate e_subjectinfo set for_stage=null; update e_subjectinfo a set a.for_stage='Y'where a.rowid=(select min(b.rowid) from e_subjectinfo b wh...
sql_汇总课堂参与信息表到课堂评分表
因为参与人员有可能评价或者不评价,所有 select a.classid,count(b.appraise),count(distinct a.userid),ceil(sum(b.appraise)/count(distinct b.userid))from o_classpartyinfo a,o_clas...
多表等值关联重复列的命名原则
select * from c_chapter_info b, (select * from tmp_content where xiuid is null) a where a.xiu=b.chapter_name and a.version_id=b...