码迷,mamicode.com
首页 > 数据库 > 详细

拼接sql ()

时间:2014-06-30 20:45:24      阅读:247      评论:0      收藏:0      [点我收藏+]

标签:des   art   cti   for   io   sql   

  SELECT ID,FORMNAME,NODENAME,SEQUENCE, NAME, STATE, NOWTIMES,
      WORK.FQREALNAME||‘(‘||FQDEPT.FULLNAME||‘)‘ AS FQREALNAME,
      NVL2(WORK.BHREALNAME,WORK.BHREALNAME||‘(‘||BHDEPT.FULLNAME||‘)‘,‘‘) AS BHREALNAME
      FROM  OA_WF_BHWORKFLOW WORK
      LEFT OUTER JOIN (SELECT FULLNAME,USERID FROM SYS_USER USERNAME LEFT OUTER JOIN SYS_ORGANIZATION  DEPT ON USERNAME.DEPARTMENTID=DEPT.ORGANIZATIONID )FQDEPT
      ON FQDEPT.USERID=WORK.FQUSERNAME
      LEFT OUTER JOIN (SELECT FULLNAME,USERID FROM SYS_USER USERNAME LEFT OUTER JOIN SYS_ORGANIZATION  DEPT ON USERNAME.DEPARTMENTID=DEPT.ORGANIZATIONID )BHDEPT
      ON BHDEPT.USERID=WORK.BHUSERNAME
      WHERE
      YJBOBJECTID=‘$YJBOBJECTID$‘
      ORDER  BY SEQUENCE DESC

拼接sql (),布布扣,bubuko.com

拼接sql ()

标签:des   art   cti   for   io   sql   

原文地址:http://www.cnblogs.com/dullbaby/p/3816263.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!