Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT * FROM((SELECT C.CANID as ID, (coalesce(CAtt.canlastname,''::text)||' '::text||coalesce(CAtt.canfirstname,''::text)||' '::text||coalesce(CAtt.cansurname,''::text)) as name, 'can'::text as Type, 2 as TypeDesc, 'o'::text as ot, C.createDate, 0 as lasteventid, VRUB.rsname, CATT.cansourceid
- FROM HR$CANDIDATE C
- INNER JOIN HR$CANATT CAtt ON (CAtt.canId = C.canId)
- LEFT OUTER JOIN VV$RUBSECTION VRUB ON (VRUB.rsid = CATT.cansourceid)
- WHERE ((C.canislimitaccess = 0) OR (C.canid in (-1)))
- ORDER BY name asc, createdate desc, id asc
- LIMIT 100 OFFSET 0)
- UNION
- (SELECT grp.gcid as id, grp.gcname as name, 'gcan'::text as type, CASE WHEN grp.grkind = 3 THEN 0 ELSE 2 END as typedesc, null as ot, cast(null as date) as createDate, 0 as lasteventid, null as rsname, null as cansourceid
- FROM HR$CANGROUP grp
- ORDER BY name asc, createdate desc, id asc
- LIMIT 100 OFFSET 0)) AS S WHERE (upper(type) != ?) ORDER BY name asc, createdate desc, id asc limit ? offset ?:-1##12##100##4##0##4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement