首页 > 数据库技术 > 详细

拼接sql ()

时间:2014-06-30 20:44:52      阅读:479      评论:0      收藏:0      [点我收藏+]
  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 ()

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!