拼接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 ()

上一篇:MySQL查询优化


下一篇:跳过权限检查,强制修改mysql密码