笨小孩做开发

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
  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
posted on 2014-06-30 11:16  笨小孩做开发  阅读(207)  评论(0编辑  收藏  举报