`
文章列表
好久没发表博客了,今日偶有闲暇 仔细研究了一遍oracle中exists 的用法,整理了在一起, 记录在itieye,以防后忘。。。。嘎嘎 1. 关于数据首先做好数据的初始化工作 -- Create tablecreate table CUSTOMERS(  CID    NUMBER not null,  CNAME  VARCHAR2(50) not null)alter table CUSTOMERS  add constraint CUSTOMERS_PK primary key (CID)  using index   tablespace USERS -- Create s ...
今天要放假咯,放年假咯!!!嘎嘎嘎
public PageObject bookList(PageParameter req, Map args) { String sql = " select BID as ID,BNAME,BREMARK,BCOVER,USERNAME as CREATEDID, TO_CHAR(CREATEDTIME,'YYYY-MM-DD HH24:MI:SS') as CREATEDTIME from tbbook b, tbuser u where b.CREATEDID = u.userid "; if (args.get("bname ...
set标签 set标签 用户将某个值 放入到指定的范围   <s:set value="#request.msgxxx" var="xxx">        <s:property value="#xxx"> </s:set>   解释set标签,通过这个ognl表达式#request.msgxxx把值取出来  
“#”的用法 集合的投影(只输出部分属性)用法 collectionName.{expression}<br> <s:iterator value="#request.personList.{name}">        <s:property> </s:iterator> ----------------------------------------------   用法2集合的过滤   "?#" 过滤所有符合条件的集合
select tt.total ,ts.SubjectID ,TS.SUBJECT,tu.userid,tu.username  from tbSubjects ts  inner join (  select count(TopicID) total ,subjectid from tbTopic GROUP BY SUBJECTID) tt on ts.SubjectID = tt.SubjectID inner join tbUser tu on ts.userid = tu.userid order by 1   按题型统计 这个sql查询,我吧 tbSubjects 题库 ...
public class LoginForUserAction extends ActionSupportExtend {  @Autowired private TbUserService tbUserService;   } public interface TbUserService {} @Servicepublic class TbUserServiceImpl implements TbUserService {  @Autowired private TbuserDAO tbuserDAO;} public interface TbuserDAO {} @Reposit ...
系统管理,有题型管理,岗位序列,和操作日志3个节点 ,其中题型管理有子个节点。 考试管理,有在线考试 和在线联系两个节点。  通过对在线考试的节点,可以完成对试卷的增删改查。           添加试卷,就是在在线考试这个节点中完成的。    在添加试卷时,试卷有效时间 往前推一天,才能在前台的我的考试,未完成的考试列表中看见。    也就是说,我今天刚生成的试卷,默认有效时间是2012-10-15 08:00到 2013-10-15 18:00。    我今天是2012-10-15 08:00,只有我定义是2012-10-14号的时候,才能在未完成考试列表中看到。         自 ...
Object[] args1 = { userName, _base_user_organid, RText.Md5(passWord), userAlias, sex, status, experience, "userAliasPY", joinWork, born, mobile, email, phone,CardID, perNo,workerSeriasNo,accountType,jobLevelID,"manualAddUser"}; userID = managerClerkService.add(args1); ...
create or replace view vw004_examineegrade asselect "EGID","USERID","TPID","WLGID","EXTIMES","EXSTATE","EXB_TIME",   "EXE_TIME","TESTTIME","OBJECTIVE","SUBJECTIVE",round(nvl(EXSCORE,0),1) as ...
String sql = "select t.tpid,eg.egid,DATE_FORMAT(eg.exb_time,'%Y-%m-%d %H:%i') as EXB_TIME,t.papername,t.viewpaper," +        "if(MINUTE(SEC_TO_TIME(eg.testtime))<>0,CONCAT(CONVERT(MINUTE(SEC_TO_TIME(eg.testtime)),char),'分',"+      convert(SECOND(SEC_TO_TIME(eg.t ...

复杂的decode()函数

    博客分类:
  • sql
select tt.ttid,tt.targettrain,DATE_FORMAT(tt.datecreated,'%Y-%m-%d %H:%i') datecreated, ifnull(ttcount,0) ttcount,ifnull(joincount,0) joincount,ifnull(passcount,0) passcount, round(     ifnull(joincount,0)*100/(    case ifnull(ttcount,0) when 0 then 1000 else ifnull(ttcount,0) end    )     ,2       ...
Column 'ttid' in where clause is ambiguous    多半是因为多表查询的时候几个表中同时出现了某个相同的列名,而在查询条件WHERE后面又没有指定是那个表,而引起的又或者是查询结果里面有两个相同的列名,而没有指定是哪个表,使用的时候可以这样,查询前面加表名可避免出现错误ambiguous 1. 含糊不清的 2. 引起歧义的   select distinct username,UserAlias,OrganName,OrganLevelName,jobname,   DATE_FORMAT(StartDate,'%Y-%m-%d %H:%i') ...
ActionContext.getContext().put("departmentList",departmentList); 是直接往 map栈中存放元素 Stack Context Key                ValuedepartmentList      [cn.xiaoxian.domain.Department@8098] <s:iterator value="departmentList"> 注意没用# -------------------------------- ServletActionContex ...
List<Map<String,Object>> maps = new ArrayList<Map<String,Object>>();   Map<String,Object> map1 = new HashMap<String,Object>(); Person person1 = new Person(); person1.setPid(1L);person1.serPname("person1") map1.put("m1",person1);----------- ...
Global site tag (gtag.js) - Google Analytics