SELECT main.LIBRARY_ID,
       main.DOCNUM,
       main.VERSION,
       main.DOCNAME,
       main.ALIAS,
       doctype.T_ALIAS,
       doctype.APPEXTENSION,
       doctype.TYPEDESCRIPT,
       dc.C_ALIAS         AS "C_ALIAS",
       dc.CLASSDESCRIPT   AS "CLASSDESCRIPT",
       dsc.SUBCLASS_ALIAS AS "SUBCLASS_ALIAS",
       dsc.CLASSDESCRIPT  AS "SUBCLASSDESCRIPT",
       main.TYPE,
       main.DEFAULT_SECURITY,
       author.USERID         author_userid,
       author.FULLNAME       author_fullname,
       operator.USERID       operator_userid,
       operator.FULLNAME     operator_fullname,
       last_user.USERID      last_user_userid,
       last_user.FULLNAME    last_user_fullname,
       inuseby.USERID        INUSEBY_USERID,
       inuseby.FULLNAME      INUSEBY_FULLNAME,
       main.ENTRYWHEN,
       main.EDITWHEN,
       main.EDITPROFILEWHEN,
       main.FILEENTRYWHEN,
       main.FILEEDITWHEN,
       main.DECLAREWHEN,
       main.HAS_ATTACHMENT,
       main.CHECKEDOUT,
       main.IS_HIPAA,
       main.ARCHIVED,
       main.INDEXABLE,
       main.ISRELATED,
       'Y'                   IS_RESTORABLE,
       main.DOCINUSE,
       main.DOCSIZE,
       main.COMMENTS,
       main.AUTHOR_RSID,
       main.OPERATOR_RSID,
       main.LASTUSER_RSID    last_user_ssid,
       main.INUSEBY_RSID,
       main.RETAIN,
       main.IS_EXTERNAL,
       main.EXTRNL_AS_NRML,
       main.T_ALIAS_RSID,
       main.C_ALIAS_RSID,
       main.C1ALIAS_RSID,
       main.C2ALIAS_RSID,
       main.C3ALIAS_RSID,
       main.C4ALIAS_RSID,
       main.C5ALIAS_RSID,
       main.C6ALIAS_RSID,
       main.C7ALIAS_RSID,
       main.C8ALIAS_RSID,
       main.C9ALIAS_RSID,
       main.C10ALIAS_RSID,
       main.C11ALIAS_RSID,
       main.C12ALIAS_RSID,
       main.C29ALIAS_RSID,
       main.C30ALIAS_RSID,
       main.C31ALIAS_RSID,
       c1.CUSTOM_ALIAS       c1_alias,
       c1.C_DESCRIPT         c1_description,
       c1.SSID               c1_SSID,
       c2.CUSTOM_ALIAS       c2_alias,
       c2.C_DESCRIPT         c2_description,
       c2.SSID               c2_SSID,
       c3.CUSTOM_ALIAS       c3_alias,
       c3.C_DESCRIPT         c3_description,
       c3.SSID               c3_SSID,
       c4.CUSTOM_ALIAS       c4_alias,
       c4.C_DESCRIPT         c4_description,
       c4.SSID               c4_SSID,
       c5.CUSTOM_ALIAS       c5_alias,
       c5.C_DESCRIPT         c5_description,
       c5.SSID               c5_SSID,
       c6.CUSTOM_ALIAS       c6_alias,
       c6.C_DESCRIPT         c6_description,
       c6.SSID               c6_SSID,
       c7.CUSTOM_ALIAS       c7_alias,
       c7.C_DESCRIPT         c7_description,
       c7.SSID               c7_SSID,
       c8.CUSTOM_ALIAS       c8_alias,
       c8.C_DESCRIPT         c8_description,
       c8.SSID               c8_SSID,
       c9.CUSTOM_ALIAS       c9_alias,
       c9.C_DESCRIPT         c9_description,
       c9.SSID               c9_SSID,
       c10.CUSTOM_ALIAS      c10_alias,
       c10.C_DESCRIPT        c10_description,
       c10.SSID              c10_SSID,
       c11.CUSTOM_ALIAS      c11_alias,
       c11.C_DESCRIPT        c11_description,
       c11.SSID              c11_SSID,
       c12.CUSTOM_ALIAS      c12_alias,
       c12.C_DESCRIPT        c12_description,
       c12.SSID              c12_SSID,
       c29.CUSTOM_ALIAS      c29_alias,
       c29.C_DESCRIPT        c29_description,
       c29.SSID              c29_SSID,
       c30.CUSTOM_ALIAS      c30_alias,
       c30.C_DESCRIPT        c30_description,
       c30.SSID              c30_SSID,
       c31.CUSTOM_ALIAS      c31_alias,
       c31.C_DESCRIPT        c31_description,
       c31.SSID              c31_SSID,
       main.C13ALIAS,
       main.C14ALIAS,
       main.C15ALIAS,
       main.C16ALIAS,
       main.CDBL1,
       main.CDBL2,
       main.CDBL3,
       main.CDBL4,
       main.CDATE1,
       main.CDATE2,
       main.CDATE3,
       main.CDATE4,
       main.CBOOL1,
       main.CBOOL2,
       main.CBOOL3,
       main.CBOOL4,
       stream.CHECKSUM    AS STREAM_CHECKSUM,
       workspace.PRJ_ID,
       workspace.PRJ_NAME
FROM DOCMASTER main
         USE INDEX (LIBRARY_ID)
         LEFT JOIN DOCUSERS author ON main.AUTHOR_RSID = author.SSID
         LEFT JOIN DOCUSERS operator ON main.OPERATOR_RSID = operator.SSID
         LEFT JOIN DOCUSERS last_user ON main.LASTUSER_RSID = last_user.SSID
         LEFT JOIN DOCUSERS inuseby ON main.INUSEBY_RSID = inuseby.SSID
         LEFT JOIN DOCTYPES doctype ON main.T_ALIAS_RSID = doctype.SSID
         LEFT JOIN DOCCLASSES dc ON main.C_ALIAS_RSID = dc.SSID
         LEFT JOIN DOCSUBCLASSES dsc ON main.SUBCLASS_ALIAS_RSID = dsc.SSID
         LEFT JOIN STREAMS stream ON main.STREAM_RSSID = stream.SSID
         LEFT JOIN CUSTOM1 c1 ON main.C1ALIAS_RSID = c1.SSID
         LEFT JOIN CUSTOM2 c2 ON main.C2ALIAS_RSID = c2.SSID AND main.C1ALIAS_RSID = c2.CPARENT_ALIAS_RSID
         LEFT JOIN CUSTOM3 c3 ON main.C3ALIAS_RSID = c3.SSID
         LEFT JOIN CUSTOM4 c4 ON main.C4ALIAS_RSID = c4.SSID
         LEFT JOIN CUSTOM5 c5 ON main.C5ALIAS_RSID = c5.SSID
         LEFT JOIN CUSTOM6 c6 ON main.C6ALIAS_RSID = c6.SSID
         LEFT JOIN CUSTOM7 c7 ON main.C7ALIAS_RSID = c7.SSID
         LEFT JOIN CUSTOM8 c8 ON main.C8ALIAS_RSID = c8.SSID
         LEFT JOIN CUSTOM9 c9 ON main.C9ALIAS_RSID = c9.SSID
         LEFT JOIN CUSTOM10 c10 ON main.C10ALIAS_RSID = c10.SSID
         LEFT JOIN CUSTOM11 c11 ON main.C11ALIAS_RSID = c11.SSID
         LEFT JOIN CUSTOM12 c12 ON main.C12ALIAS_RSID = c12.SSID
         LEFT JOIN CUSTOM29 c29 ON main.C29ALIAS_RSID = c29.SSID
         LEFT JOIN CUSTOM30 c30 ON main.C30ALIAS_RSID = c30.SSID
         LEFT JOIN CUSTOM31 c31 ON main.C31ALIAS_RSID = c31.SSID
         LEFT JOIN PROJECTS AS workspace ON workspace.SSID = (SELECT workspaces.SSID
                                                              FROM PROJECT_ITEMS AS project_items
                                                                       INNER JOIN PROJECTS AS folders
                                                                                  ON project_items.LIBRARY_ID =
                                                                                     folders.LIBRARY_ID AND
                                                                                     project_items.PRJ_ID =
                                                                                     folders.PRJ_ID
                                                                       INNER JOIN PROJECTS AS workspaces
                                                                                  ON folders.LIBRARY_ID =
                                                                                     workspaces.LIBRARY_ID AND
                                                                                     folders.TREE_ID =
                                                                                     workspaces.PRJ_ID AND
                                                                                     workspaces.TYPE = 1
                                                              WHERE project_items.LIBRARY_ID = main.LIBRARY_ID
                                                                AND project_items.ITEM_ID = main.DOCNUM
                                                                AND project_items.VERSION IS NULL
                                                              ORDER BY workspaces.LIBRARY_ID DESC, workspaces.PRJ_ID DESC
                                                              LIMIT 1)
WHERE main.library_id = 2562 and main.version = 1 and (
              (main.docnum = 30004001) or
              (main.docnum = 30004002) or
              (main.docnum = 30004003) or
              (main.docnum = 30004004) or
              (main.docnum = 30004005) or
              (main.docnum = 30004006) or
              (main.docnum = 30004007) or
              (main.docnum = 30004008) or
              (main.docnum = 30004009) or
              (main.docnum = 30004010) or
              (main.docnum = 30004011) or
              (main.docnum = 30004012) or
              (main.docnum = 30004013) or
              (main.docnum = 30004014) or
              (main.docnum = 30004015) or
              (main.docnum = 30004016) or
              (main.docnum = 30004017) or
              (main.docnum = 30004018) or
              (main.docnum = 30004019) or
              (main.docnum = 30004020) or
              (main.docnum = 30004021) or
              (main.docnum = 30004022) or
              (main.docnum = 30004023) or
              (main.docnum = 30004024) or
              (main.docnum = 30004025) or
              (main.docnum = 30004026) or
              (main.docnum = 30004027) or
              (main.docnum = 30004028) or
              (main.docnum = 30004029) or
              (main.docnum = 30004030) or
              (main.docnum = 30004031) or
              (main.docnum = 30004032) or
              (main.docnum = 30004033) or
              (main.docnum = 30004034) or
              (main.docnum = 30004035) or
              (main.docnum = 30004036) or
              (main.docnum = 30004037) or
              (main.docnum = 30004038) or
              (main.docnum = 30004039) or
              (main.docnum = 30004040) or
              (main.docnum = 30004041) or
              (main.docnum = 30004042) or
              (main.docnum = 30004043) or
              (main.docnum = 30004044) or
              (main.docnum = 30004045) or
              (main.docnum = 30004046) or
              (main.docnum = 30004047) or
              (main.docnum = 30004048) or
              (main.docnum = 30004049) or
              (main.docnum = 30004050) or
              (main.docnum = 30004051) or
              (main.docnum = 30004052) or
              (main.docnum = 30004053) or
              (main.docnum = 30004054) or
              (main.docnum = 30004055) or
              (main.docnum = 30004056) or
              (main.docnum = 30004057) or
              (main.docnum = 30004058) or
              (main.docnum = 30004059) or
              (main.docnum = 30004060) or
              (main.docnum = 30004061) or
              (main.docnum = 30004062) or
              (main.docnum = 30004063) or
              (main.docnum = 30004064) or
              (main.docnum = 30004065) or
              (main.docnum = 30004066) or
              (main.docnum = 30004067) or
              (main.docnum = 30004068) or
              (main.docnum = 30004069) or
              (main.docnum = 30004070) or
              (main.docnum = 30004071) or
              (main.docnum = 30004072) or
              (main.docnum = 30004073) or
              (main.docnum = 30004074) or
              (main.docnum = 30004075) or
              (main.docnum = 30004076) or
              (main.docnum = 30004077) or
              (main.docnum = 30004078) or
              (main.docnum = 30004079) or
              (main.docnum = 30004080) or
              (main.docnum = 30004081) or
              (main.docnum = 30004082) or
              (main.docnum = 30004083) or
              (main.docnum = 30004084) or
              (main.docnum = 30004085) or
              (main.docnum = 30004086) or
              (main.docnum = 30004087) or
              (main.docnum = 30004088) or
              (main.docnum = 30004089) or
              (main.docnum = 30004090) or
              (main.docnum = 30004091) or
              (main.docnum = 30004092) or
              (main.docnum = 30004093) or
              (main.docnum = 30004094) or
              (main.docnum = 30004095) or
              (main.docnum = 30004096) or
              (main.docnum = 30004097) or
              (main.docnum = 30004098) or
              (main.docnum = 30004099) or
              (main.docnum = 30004100) or
              (main.docnum = 30004101) or
              (main.docnum = 30004102) or
              (main.docnum = 30004103) or
              (main.docnum = 30004104) or
              (main.docnum = 30004105) or
              (main.docnum = 30004106) or
              (main.docnum = 30004107) or
              (main.docnum = 30004108) or
              (main.docnum = 30004109) or
              (main.docnum = 30004110) or
              (main.docnum = 30004111) or
              (main.docnum = 30004112) or
              (main.docnum = 30004113) or
              (main.docnum = 30004114) or
              (main.docnum = 30004115) or
              (main.docnum = 30004116) or
              (main.docnum = 30004117) or
              (main.docnum = 30004118) or
              (main.docnum = 30004119) or
              (main.docnum = 30004120) or
              (main.docnum = 30004121) or
              (main.docnum = 30004122) or
              (main.docnum = 30004123) or
              (main.docnum = 30004124) or
              (main.docnum = 30004125) or
              (main.docnum = 30004126) or
              (main.docnum = 30004127) or
              (main.docnum = 30004128) or
              (main.docnum = 30004129) or
              (main.docnum = 30004130) or
              (main.docnum = 30004131) or
              (main.docnum = 30004132) or
              (main.docnum = 30004133) or
              (main.docnum = 30004134) or
              (main.docnum = 30004135) or
              (main.docnum = 30004136) or
              (main.docnum = 30004137) or
              (main.docnum = 30004138) or
              (main.docnum = 30004139) or
              (main.docnum = 30004140) or
              (main.docnum = 30004141) or
              (main.docnum = 30004142) or
              (main.docnum = 30004143) or
              (main.docnum = 30004144) or
              (main.docnum = 30004145) or
              (main.docnum = 30004146) or
              (main.docnum = 30004147) or
              (main.docnum = 30004148) or
              (main.docnum = 30004149) or
              (main.docnum = 30004150) or
              (main.docnum = 30004151) or
              (main.docnum = 30004152) or
              (main.docnum = 30004153) or
              (main.docnum = 30004154) or
              (main.docnum = 30004155) or
              (main.docnum = 30004156) or
              (main.docnum = 30004157) or
              (main.docnum = 30004158) or
              (main.docnum = 30004159) or
              (main.docnum = 30004160) or
              (main.docnum = 30004161) or
              (main.docnum = 30004162) or
              (main.docnum = 30004163) or
              (main.docnum = 30004164) or
              (main.docnum = 30004165) or
              (main.docnum = 30004166) or
              (main.docnum = 30004167) or
              (main.docnum = 30004168) or
              (main.docnum = 30004169) or
              (main.docnum = 30004170) or
              (main.docnum = 30004171) or
              (main.docnum = 30004172) or
              (main.docnum = 30004173) or
              (main.docnum = 30004174) or
              (main.docnum = 30004175) or
              (main.docnum = 30004176) or
              (main.docnum = 30004177) or
              (main.docnum = 30004178) or
              (main.docnum = 30004179) or
              (main.docnum = 30004180) or
              (main.docnum = 30004181) or
              (main.docnum = 30004182) or
              (main.docnum = 30004183) or
              (main.docnum = 30004184) or
              (main.docnum = 30004185) or
              (main.docnum = 30004186) or
              (main.docnum = 30004187) or
              (main.docnum = 30004188) or
              (main.docnum = 30004189) or
              (main.docnum = 30004190) or
              (main.docnum = 30004191) or
              (main.docnum = 30004192) or
              (main.docnum = 30004193) or
              (main.docnum = 30004194) or
              (main.docnum = 30004195) or
              (main.docnum = 30004196) or
              (main.docnum = 30004197) or
              (main.docnum = 30004198) or
              (main.docnum = 30004199) or
              (main.docnum = 30004200) or
              (main.docnum = 30004201) or
              (main.docnum = 30004202) or
              (main.docnum = 30004203) or
              (main.docnum = 30004204) or
              (main.docnum = 30004205) or
              (main.docnum = 30004206) or
              (main.docnum = 30004207) or
              (main.docnum = 30004208) or
              (main.docnum = 30004209) or
              (main.docnum = 30004210) or
              (main.docnum = 30004211) or
              (main.docnum = 30004212) or
              (main.docnum = 30004213) or
              (main.docnum = 30004214) or
              (main.docnum = 30004215) or
              (main.docnum = 30004216) or
              (main.docnum = 30004217) or
              (main.docnum = 30004218) or
              (main.docnum = 30004219) or
              (main.docnum = 30004220) or
              (main.docnum = 30004221) or
              (main.docnum = 30004222) or
              (main.docnum = 30004223) or
              (main.docnum = 30004224) or
              (main.docnum = 30004225) or
              (main.docnum = 30004226) or
              (main.docnum = 30004227) or
              (main.docnum = 30004228) or
              (main.docnum = 30004229) or
              (main.docnum = 30004230) or
              (main.docnum = 30004231) or
              (main.docnum = 30004232) or
              (main.docnum = 30004233) or
              (main.docnum = 30004234) or
              (main.docnum = 30004235) or
              (main.docnum = 30004236) or
              (main.docnum = 30004237) or
              (main.docnum = 30004238) or
              (main.docnum = 30004239) or
              (main.docnum = 30004240) or
              (main.docnum = 30004241) or
              (main.docnum = 30004242) or
              (main.docnum = 30004243) or
              (main.docnum = 30004244) or
              (main.docnum = 30004245) or
              (main.docnum = 30004246) or
              (main.docnum = 30004247) or
              (main.docnum = 30004248) or
              (main.docnum = 30004249) or
              (main.docnum = 30004250) or
              (main.docnum = 30004251) or
              (main.docnum = 30004252) or
              (main.docnum = 30004253) or
              (main.docnum = 30004254) or
              (main.docnum = 30004255) or
              (main.docnum = 30004256) or
              (main.docnum = 30004257) or
              (main.docnum = 30004258) or
              (main.docnum = 30004259) or
              (main.docnum = 30004260) or
              (main.docnum = 30004261) or
              (main.docnum = 30004262) or
              (main.docnum = 30004263) or
              (main.docnum = 30004264) or
              (main.docnum = 30004265) or
              (main.docnum = 30004266) or
              (main.docnum = 30004267) or
              (main.docnum = 30004268) or
              (main.docnum = 30004269) or
              (main.docnum = 30004270) or
              (main.docnum = 30004271) or
              (main.docnum = 30004272) or
              (main.docnum = 30004273) or
              (main.docnum = 30004274) or
              (main.docnum = 30004275) or
              (main.docnum = 30004276) or
              (main.docnum = 30004277) or
              (main.docnum = 30004278) or
              (main.docnum = 30004279) or
              (main.docnum = 30004280) or
              (main.docnum = 30004281) or
              (main.docnum = 30004282) or
              (main.docnum = 30004283) or
              (main.docnum = 30004284) or
              (main.docnum = 30004285) or
              (main.docnum = 30004286) or
              (main.docnum = 30004287) or
              (main.docnum = 30004288) or
              (main.docnum = 30004289) or
              (main.docnum = 30004290) or
              (main.docnum = 30004291) or
              (main.docnum = 30004292) or
              (main.docnum = 30004293) or
              (main.docnum = 30004294) or
              (main.docnum = 30004295) or
              (main.docnum = 30004296) or
              (main.docnum = 30004297) or
              (main.docnum = 30004298) or
              (main.docnum = 30004299) or
              (main.docnum = 30004300) or
              (main.docnum = 30004301) or
              (main.docnum = 30004302) or
              (main.docnum = 30004303) or
              (main.docnum = 30004304) or
              (main.docnum = 30004305) or
              (main.docnum = 30004306) or
              (main.docnum = 30004307) or
              (main.docnum = 30004308) or
              (main.docnum = 30004309) or
              (main.docnum = 30004310) or
              (main.docnum = 30004311) or
              (main.docnum = 30004312) or
              (main.docnum = 30004313) or
              (main.docnum = 30004314) or
              (main.docnum = 30004315) or
              (main.docnum = 30004316) or
              (main.docnum = 30004317) or
              (main.docnum = 30004318) or
              (main.docnum = 30004319) or
              (main.docnum = 30004320) or
              (main.docnum = 30004321) or
              (main.docnum = 30004322) or
              (main.docnum = 30004323) or
              (main.docnum = 30004324) or
              (main.docnum = 30004325) or
              (main.docnum = 30004326) or
              (main.docnum = 30004327) or
              (main.docnum = 30004328) or
              (main.docnum = 30004329) or
              (main.docnum = 30004330) or
              (main.docnum = 30004331) or
              (main.docnum = 30004332) or
              (main.docnum = 30004333) or
              (main.docnum = 30004334) or
              (main.docnum = 30004335) or
              (main.docnum = 30004336) or
              (main.docnum = 30004337) or
              (main.docnum = 30004338) or
              (main.docnum = 30004339) or
              (main.docnum = 30004340) or
              (main.docnum = 30004341) or
              (main.docnum = 30004342) or
              (main.docnum = 30004343) or
              (main.docnum = 30004344) or
              (main.docnum = 30004345) or
              (main.docnum = 30004346) or
              (main.docnum = 30004347) or
              (main.docnum = 30004348) or
              (main.docnum = 30004349) or
              (main.docnum = 30004350) or
              (main.docnum = 30004351) or
              (main.docnum = 30004352) or
              (main.docnum = 30004353) or
              (main.docnum = 30004354) or
              (main.docnum = 30004355) or
              (main.docnum = 30004356) or
              (main.docnum = 30004357) or
              (main.docnum = 30004358) or
              (main.docnum = 30004359) or
              (main.docnum = 30004360) or
              (main.docnum = 30004361) or
              (main.docnum = 30004362) or
              (main.docnum = 30004363) or
              (main.docnum = 30004364) or
              (main.docnum = 30004365) or
              (main.docnum = 30004366) or
              (main.docnum = 30004367) or
              (main.docnum = 30004368) or
              (main.docnum = 30004369) or
              (main.docnum = 30004370) or
              (main.docnum = 30004371) or
              (main.docnum = 30004372) or
              (main.docnum = 30004373) or
              (main.docnum = 30004374) or
              (main.docnum = 30004375) or
              (main.docnum = 30004376) or
              (main.docnum = 30004377) or
              (main.docnum = 30004378) or
              (main.docnum = 30004379) or
              (main.docnum = 30004380) or
              (main.docnum = 30004381) or
              (main.docnum = 30004382) or
              (main.docnum = 30004383) or
              (main.docnum = 30004384) or
              (main.docnum = 30004385) or
              (main.docnum = 30004386) or
              (main.docnum = 30004387) or
              (main.docnum = 30004388) or
              (main.docnum = 30004389) or
              (main.docnum = 30004390) or
              (main.docnum = 30004391) or
              (main.docnum = 30004392) or
              (main.docnum = 30004393) or
              (main.docnum = 30004394) or
              (main.docnum = 30004395) or
              (main.docnum = 30004396) or
              (main.docnum = 30004397) or
              (main.docnum = 30004398) or
              (main.docnum = 30004399) or
              (main.docnum = 30004400) or
              (main.docnum = 30004401) or
              (main.docnum = 30004402) or
              (main.docnum = 30004403) or
              (main.docnum = 30004404) or
              (main.docnum = 30004405) or
              (main.docnum = 30004406) or
              (main.docnum = 30004407) or
              (main.docnum = 30004408) or
              (main.docnum = 30004409) or
              (main.docnum = 30004410) or
              (main.docnum = 30004411) or
              (main.docnum = 30004412) or
              (main.docnum = 30004413) or
              (main.docnum = 30004414) or
              (main.docnum = 30004415) or
              (main.docnum = 30004416) or
              (main.docnum = 30004417) or
              (main.docnum = 30004418) or
              (main.docnum = 30004419) or
              (main.docnum = 30004420) or
              (main.docnum = 30004421) or
              (main.docnum = 30004422) or
              (main.docnum = 30004423) or
              (main.docnum = 30004424) or
              (main.docnum = 30004425) or
              (main.docnum = 30004426) or
              (main.docnum = 30004427) or
              (main.docnum = 30004428) or
              (main.docnum = 30004429) or
              (main.docnum = 30004430) or
              (main.docnum = 30004431) or
              (main.docnum = 30004432) or
              (main.docnum = 30004433) or
              (main.docnum = 30004434) or
              (main.docnum = 30004435) or
              (main.docnum = 30004436) or
              (main.docnum = 30004437) or
              (main.docnum = 30004438) or
              (main.docnum = 30004439) or
              (main.docnum = 30004440) or
              (main.docnum = 30004441) or
              (main.docnum = 30004442) or
              (main.docnum = 30004443) or
              (main.docnum = 30004444) or
              (main.docnum = 30004445) or
              (main.docnum = 30004446) or
              (main.docnum = 30004447) or
              (main.docnum = 30004448) or
              (main.docnum = 30004449) or
              (main.docnum = 30004450) or
              (main.docnum = 30004451) or
              (main.docnum = 30004452) or
              (main.docnum = 30004453) or
              (main.docnum = 30004454) or
              (main.docnum = 30004455) or
              (main.docnum = 30004456) or
              (main.docnum = 30004457) or
              (main.docnum = 30004458) or
              (main.docnum = 30004459) or
              (main.docnum = 30004460) or
              (main.docnum = 30004461) or
              (main.docnum = 30004462) or
              (main.docnum = 30004463) or
              (main.docnum = 30004464) or
              (main.docnum = 30004465) or
              (main.docnum = 30004466) or
              (main.docnum = 30004467) or
              (main.docnum = 30004468) or
              (main.docnum = 30004469) or
              (main.docnum = 30004470) or
              (main.docnum = 30004471) or
              (main.docnum = 30004472) or
              (main.docnum = 30004473) or
              (main.docnum = 30004474) or
              (main.docnum = 30004475) or
              (main.docnum = 30004476) or
              (main.docnum = 30004476) or
              (main.docnum = 30004477) or
              (main.docnum = 30004478) or
              (main.docnum = 30004479) or
              (main.docnum = 30004480) or
              (main.docnum = 30004481) or
              (main.docnum = 30004482) or
              (main.docnum = 30004483) or
              (main.docnum = 30004484) or
              (main.docnum = 30004485) or
              (main.docnum = 30004486) or
              (main.docnum = 30004487) or
              (main.docnum = 30004488) or
              (main.docnum = 30004489) or
              (main.docnum = 30004490) or
              (main.docnum = 30004491) or
              (main.docnum = 30004492) or
              (main.docnum = 30004493) or
              (main.docnum = 30004494) or
              (main.docnum = 30004495) or
              (main.docnum = 30004496) or
              (main.docnum = 30004497) or
              (main.docnum = 30004498) or
              (main.docnum = 30004499) or
              (main.docnum = 30004500) or
              (main.docnum = 30004501) or
              (main.docnum = 30004502) or
              (main.docnum = 30004503) or
              (main.docnum = 30004504) or
              (main.docnum = 30004505) or
              (main.docnum = 30004506) or
              (main.docnum = 30004507) or
              (main.docnum = 30004508) or
              (main.docnum = 30004509) or
              (main.docnum = 30004510) or
              (main.docnum = 30004511) or
              (main.docnum = 30004512) or
              (main.docnum = 30004513) or
              (main.docnum = 30004514) or
              (main.docnum = 30004515) or
              (main.docnum = 30004516) or
              (main.docnum = 30004517) or
              (main.docnum = 30004518) or
              (main.docnum = 30004519) or
              (main.docnum = 30004520) or
              (main.docnum = 30004521) or
              (main.docnum = 30004522) or
              (main.docnum = 30004523) or
              (main.docnum = 30004524) or
              (main.docnum = 30004525) or
              (main.docnum = 30004526) or
              (main.docnum = 30004527) or
              (main.docnum = 30004528) or
              (main.docnum = 30004529) or
              (main.docnum = 30004530) or
              (main.docnum = 30004531) or
              (main.docnum = 30004532) or
              (main.docnum = 30004533) or
              (main.docnum = 30004534) or
              (main.docnum = 30004535) or
              (main.docnum = 30004536) or
              (main.docnum = 30004537) or
              (main.docnum = 30004538) or
              (main.docnum = 30004539) or
              (main.docnum = 30004540) or
              (main.docnum = 30004541) or
              (main.docnum = 30004542) or
              (main.docnum = 30004543) or
              (main.docnum = 30004544) or
              (main.docnum = 30004545) or
              (main.docnum = 30004546) or
              (main.docnum = 30004547) or
              (main.docnum = 30004548) or
              (main.docnum = 30004549) or
              (main.docnum = 30004550) or
              (main.docnum = 30004551) or
              (main.docnum = 30004552) or
              (main.docnum = 30004553) or
              (main.docnum = 30004554) or
              (main.docnum = 30004555) or
              (main.docnum = 30004556) or
              (main.docnum = 30004557) or
              (main.docnum = 30004558) or
              (main.docnum = 30004559) or
              (main.docnum = 30004560) or
              (main.docnum = 30004561) or
              (main.docnum = 30004562) or
              (main.docnum = 30004563) or
              (main.docnum = 30004564) or
              (main.docnum = 30004565) or
              (main.docnum = 30004566) or
              (main.docnum = 30004567) or
              (main.docnum = 30004568) or
              (main.docnum = 30004569) or
              (main.docnum = 30004570) or
              (main.docnum = 30004571) or
              (main.docnum = 30004572) or
              (main.docnum = 30004573) or
              (main.docnum = 30004574) or
              (main.docnum = 30004575) or
              (main.docnum = 30004576) or
              (main.docnum = 30004577) or
              (main.docnum = 30004578) or
              (main.docnum = 30004579) or
              (main.docnum = 30004580) or
              (main.docnum = 30004581) or
              (main.docnum = 30004582) or
              (main.docnum = 30004583) or
              (main.docnum = 30004584) or
              (main.docnum = 30004585) or
              (main.docnum = 30004586) or
              (main.docnum = 30004587) or
              (main.docnum = 30004588) or
              (main.docnum = 30004589) or
              (main.docnum = 30004590) or
              (main.docnum = 30004591) or
              (main.docnum = 30004592) or
              (main.docnum = 30004593) or
              (main.docnum = 30004594) or
              (main.docnum = 30004595) or
              (main.docnum = 30004596) or
              (main.docnum = 30004597) or
              (main.docnum = 30004598) or
              (main.docnum = 30004599) or
              (main.docnum = 30004600) or
              (main.docnum = 30004601) or
              (main.docnum = 30004602) or
              (main.docnum = 30004603) or
              (main.docnum = 30004604) or
              (main.docnum = 30004605) or
              (main.docnum = 30004606) or
              (main.docnum = 30004607) or
              (main.docnum = 30004608) or
              (main.docnum = 30004609) or
              (main.docnum = 30004610) or
              (main.docnum = 30004611) or
              (main.docnum = 30004612) or
              (main.docnum = 30004613) or
              (main.docnum = 30004614) or
              (main.docnum = 30004615) or
              (main.docnum = 30004616) or
              (main.docnum = 30004617) or
              (main.docnum = 30004618) or
              (main.docnum = 30004619) or
              (main.docnum = 30004620) or
              (main.docnum = 30004621) or
              (main.docnum = 30004622) or
              (main.docnum = 30004623) or
              (main.docnum = 30004624) or
              (main.docnum = 30004625) or
              (main.docnum = 30004626) or
              (main.docnum = 30004627) or
              (main.docnum = 30004628) or
              (main.docnum = 30004629) or
              (main.docnum = 30004630) or
              (main.docnum = 30004631) or
              (main.docnum = 30004632) or
              (main.docnum = 30004633) or
              (main.docnum = 30004634) or
              (main.docnum = 30004635) or
              (main.docnum = 30004636) or
              (main.docnum = 30004637) or
              (main.docnum = 30004638) or
              (main.docnum = 30004639) or
              (main.docnum = 30004640) or
              (main.docnum = 30004641) or
              (main.docnum = 30004642) or
              (main.docnum = 30004643) or
              (main.docnum = 30004644) or
              (main.docnum = 30004645) or
              (main.docnum = 30004646) or
              (main.docnum = 30004647) or
              (main.docnum = 30004648) or
              (main.docnum = 30004649) or
              (main.docnum = 30004650) or
              (main.docnum = 30004651) or
              (main.docnum = 30004652) or
              (main.docnum = 30004653) or
              (main.docnum = 30004654) or
              (main.docnum = 30004655) or
              (main.docnum = 30004656) or
              (main.docnum = 30004657) or
              (main.docnum = 30004658) or
              (main.docnum = 30004659) or
              (main.docnum = 30004660) or
              (main.docnum = 30004661) or
              (main.docnum = 30004662) or
              (main.docnum = 30004663) or
              (main.docnum = 30004664) or
              (main.docnum = 30004665) or
              (main.docnum = 30004666) or
              (main.docnum = 30004667) or
              (main.docnum = 30004668) or
              (main.docnum = 30004669) or
              (main.docnum = 30004670) or
              (main.docnum = 30004671) or
              (main.docnum = 30004672) or
              (main.docnum = 30004673) or
              (main.docnum = 30004674) or
              (main.docnum = 30004675) or
              (main.docnum = 30004676) or
              (main.docnum = 30004677) or
              (main.docnum = 30004678) or
              (main.docnum = 30004679) or
              (main.docnum = 30004680) or
              (main.docnum = 30004681) or
              (main.docnum = 30004682) or
              (main.docnum = 30004683) or
              (main.docnum = 30004684) or
              (main.docnum = 30004685) or
              (main.docnum = 30004686) or
              (main.docnum = 30004687) or
              (main.docnum = 30004688) or
              (main.docnum = 30004689) or
              (main.docnum = 30004690) or
              (main.docnum = 30004691) or
              (main.docnum = 30004692) or
              (main.docnum = 30004693) or
              (main.docnum = 30004694) or
              (main.docnum = 30004695) or
              (main.docnum = 30004696) or
              (main.docnum = 30004697) or
              (main.docnum = 30004698) or
              (main.docnum = 30004699) or
              (main.docnum = 30004700) or
              (main.docnum = 30004701) or
              (main.docnum = 30004702) or
              (main.docnum = 30004703) or
              (main.docnum = 30004704) or
              (main.docnum = 30004705) or
              (main.docnum = 30004706) or
              (main.docnum = 30004707) or
              (main.docnum = 30004708) or
              (main.docnum = 30004709) or
              (main.docnum = 30004710) or
              (main.docnum = 30004711) or
              (main.docnum = 30004712) or
              (main.docnum = 30004713) or
              (main.docnum = 30004714) or
              (main.docnum = 30004715) or
              (main.docnum = 30004716) or
              (main.docnum = 30004717) or
              (main.docnum = 30004718) or
              (main.docnum = 30004719) or
              (main.docnum = 30004720) or
              (main.docnum = 30004721) or
              (main.docnum = 30004722) or
              (main.docnum = 30004723) or
              (main.docnum = 30004724) or
              (main.docnum = 30004725) or
              (main.docnum = 30004726) or
              (main.docnum = 30004727) or
              (main.docnum = 30004728) or
              (main.docnum = 30004729) or
              (main.docnum = 30004730) or
              (main.docnum = 30004731) or
              (main.docnum = 30004732) or
              (main.docnum = 30004733) or
              (main.docnum = 30004734) or
              (main.docnum = 30004735) or
              (main.docnum = 30004736) or
              (main.docnum = 30004737) or
              (main.docnum = 30004738) or
              (main.docnum = 30004739) or
              (main.docnum = 30004740) or
              (main.docnum = 30004741) or
              (main.docnum = 30004742) or
              (main.docnum = 30004743) or
              (main.docnum = 30004744) or
              (main.docnum = 30004745) or
              (main.docnum = 30004746) or
              (main.docnum = 30004747) or
              (main.docnum = 30004748) or
              (main.docnum = 30004749) or
              (main.docnum = 30004750) or
              (main.docnum = 30004751) or
              (main.docnum = 30004752) or
              (main.docnum = 30004753) or
              (main.docnum = 30004754) or
              (main.docnum = 30004755) or
              (main.docnum = 30004756) or
              (main.docnum = 30004757) or
              (main.docnum = 30004758) or
              (main.docnum = 30004759) or
              (main.docnum = 30004760) or
              (main.docnum = 30004761) or
              (main.docnum = 30004762) or
              (main.docnum = 30004763) or
              (main.docnum = 30004764) or
              (main.docnum = 30004765) or
              (main.docnum = 30004766) or
              (main.docnum = 30004767) or
              (main.docnum = 30004768) or
              (main.docnum = 30004769) or
              (main.docnum = 30004770) or
              (main.docnum = 30004771) or
              (main.docnum = 30004772) or
              (main.docnum = 30004773) or
              (main.docnum = 30004774) or
              (main.docnum = 30004775) or
              (main.docnum = 30004776) or
              (main.docnum = 30004777) or
              (main.docnum = 30004778) or
              (main.docnum = 30004779) or
              (main.docnum = 30004780) or
              (main.docnum = 30004781) or
              (main.docnum = 30004782) or
              (main.docnum = 30004783) or
              (main.docnum = 30004784) or
              (main.docnum = 30004785) or
              (main.docnum = 30004786) or
              (main.docnum = 30004787) or
              (main.docnum = 30004788) or
              (main.docnum = 30004789) or
              (main.docnum = 30004790) or
              (main.docnum = 30004791) or
              (main.docnum = 30004792) or
              (main.docnum = 30004793) or
              (main.docnum = 30004794) or
              (main.docnum = 30004795) or
              (main.docnum = 30004796) or
              (main.docnum = 30004797) or
              (main.docnum = 30004798) or
              (main.docnum = 30004799) or
              (main.docnum = 30004800) or
              (main.docnum = 30004801) or
              (main.docnum = 30004802) or
              (main.docnum = 30004803) or
              (main.docnum = 30004804) or
              (main.docnum = 30004805) or
              (main.docnum = 30004806) or
              (main.docnum = 30004807) or
              (main.docnum = 30004808) or
              (main.docnum = 30004809) or
              (main.docnum = 30004810) or
              (main.docnum = 30004811) or
              (main.docnum = 30004812) or
              (main.docnum = 30004813) or
              (main.docnum = 30004814) or
              (main.docnum = 30004815) or
              (main.docnum = 30004816) or
              (main.docnum = 30004817) or
              (main.docnum = 30004818) or
              (main.docnum = 30004819) or
              (main.docnum = 30004820) or
              (main.docnum = 30004821) or
              (main.docnum = 30004822) or
              (main.docnum = 30004823) or
              (main.docnum = 30004824) or
              (main.docnum = 30004825) or
              (main.docnum = 30004826) or
              (main.docnum = 30004827) or
              (main.docnum = 30004828) or
              (main.docnum = 30004829) or
              (main.docnum = 30004830) or
              (main.docnum = 30004831) or
              (main.docnum = 30004832) or
              (main.docnum = 30004833) or
              (main.docnum = 30004834) or
              (main.docnum = 30004835) or
              (main.docnum = 30004836) or
              (main.docnum = 30004837) or
              (main.docnum = 30004838) or
              (main.docnum = 30004839) or
              (main.docnum = 30004840) or
              (main.docnum = 30004841) or
              (main.docnum = 30004842) or
              (main.docnum = 30004843) or
              (main.docnum = 30004844) or
              (main.docnum = 30004845) or
              (main.docnum = 30004846) or
              (main.docnum = 30004847) or
              (main.docnum = 30004848) or
              (main.docnum = 30004849) or
              (main.docnum = 30004850) or
              (main.docnum = 30004851) or
              (main.docnum = 30004852) or
              (main.docnum = 30004853) or
              (main.docnum = 30004854) or
              (main.docnum = 30004855) or
              (main.docnum = 30004856) or
              (main.docnum = 30004857) or
              (main.docnum = 30004858) or
              (main.docnum = 30004859) or
              (main.docnum = 30004860) or
              (main.docnum = 30004861) or
              (main.docnum = 30004862) or
              (main.docnum = 30004863) or
              (main.docnum = 30004864) or
              (main.docnum = 30004865) or
              (main.docnum = 30004866) or
              (main.docnum = 30004867) or
              (main.docnum = 30004868) or
              (main.docnum = 30004869) or
              (main.docnum = 30004870) or
              (main.docnum = 30004871) or
              (main.docnum = 30004872) or
              (main.docnum = 30004873) or
              (main.docnum = 30004874) or
              (main.docnum = 30004875) or
              (main.docnum = 30004876) or
              (main.docnum = 30004877) or
              (main.docnum = 30004878) or
              (main.docnum = 30004879) or
              (main.docnum = 30004880) or
              (main.docnum = 30004881) or
              (main.docnum = 30004882) or
              (main.docnum = 30004883) or
              (main.docnum = 30004884) or
              (main.docnum = 30004885) or
              (main.docnum = 30004886) or
              (main.docnum = 30004887) or
              (main.docnum = 30004888) or
              (main.docnum = 30004889) or
              (main.docnum = 30004890) or
              (main.docnum = 30004891) or
              (main.docnum = 30004892) or
              (main.docnum = 30004893) or
              (main.docnum = 30004894) or
              (main.docnum = 30004895) or
              (main.docnum = 30004896) or
              (main.docnum = 30004897) or
              (main.docnum = 30004898) or
              (main.docnum = 30004899) or
              (main.docnum = 30004900) or
              (main.docnum = 30004901) or
              (main.docnum = 30004902) or
              (main.docnum = 30004903) or
              (main.docnum = 30004904) or
              (main.docnum = 30004905) or
              (main.docnum = 30004906) or
              (main.docnum = 30004907) or
              (main.docnum = 30004908) or
              (main.docnum = 30004909) or
              (main.docnum = 30004910) or
              (main.docnum = 30004911) or
              (main.docnum = 30004912) or
              (main.docnum = 30004913) or
              (main.docnum = 30004914) or
              (main.docnum = 30004915) or
              (main.docnum = 30004916) or
              (main.docnum = 30004917) or
              (main.docnum = 30004918) or
              (main.docnum = 30004919) or
              (main.docnum = 30004920) or
              (main.docnum = 30004921) or
              (main.docnum = 30004922) or
              (main.docnum = 30004923) or
              (main.docnum = 30004924) or
              (main.docnum = 30004925) or
              (main.docnum = 30004926) or
              (main.docnum = 30004927) or
              (main.docnum = 30004928) or
              (main.docnum = 30004929) or
              (main.docnum = 30004930) or
              (main.docnum = 30004931) or
              (main.docnum = 30004932) or
              (main.docnum = 30004933) or
              (main.docnum = 30004934) or
              (main.docnum = 30004935) or
              (main.docnum = 30004936) or
              (main.docnum = 30004937) or
              (main.docnum = 30004938) or
              (main.docnum = 30004939) or
              (main.docnum = 30004940) or
              (main.docnum = 30004941) or
              (main.docnum = 30004942) or
              (main.docnum = 30004943) or
              (main.docnum = 30004944) or
              (main.docnum = 30004945) or
              (main.docnum = 30004946) or
              (main.docnum = 30004947) or
              (main.docnum = 30004948) or
              (main.docnum = 30004949) or
              (main.docnum = 30004950) or
              (main.docnum = 30004951) or
              (main.docnum = 30004952) or
              (main.docnum = 30004953) or
              (main.docnum = 30004954) or
              (main.docnum = 30004955) or
              (main.docnum = 30004956) or
              (main.docnum = 30004957) or
              (main.docnum = 30004958) or
              (main.docnum = 30004959) or
              (main.docnum = 30004960) or
              (main.docnum = 30004961) or
              (main.docnum = 30004962) or
              (main.docnum = 30004963) or
              (main.docnum = 30004964) or
              (main.docnum = 30004965) or
              (main.docnum = 30004966) or
              (main.docnum = 30004967) or
              (main.docnum = 30004968) or
              (main.docnum = 30004969) or
              (main.docnum = 30004970) or
              (main.docnum = 30004971) or
              (main.docnum = 30004972) or
              (main.docnum = 30004973) or
              (main.docnum = 30004974) or
              (main.docnum = 30004975) or
              (main.docnum = 30004976) or
              (main.docnum = 30004977) or
              (main.docnum = 30004978) or
              (main.docnum = 30004979) or
              (main.docnum = 30004980) or
              (main.docnum = 30004981) or
              (main.docnum = 30004982) or
              (main.docnum = 30004983) or
              (main.docnum = 30004984) or
              (main.docnum = 30004985) or
              (main.docnum = 30004986) or
              (main.docnum = 30004987) or
              (main.docnum = 30004988) or
              (main.docnum = 30004989) or
              (main.docnum = 30004990) or
              (main.docnum = 30004991) or
              (main.docnum = 30004992) or
              (main.docnum = 30004993) or
              (main.docnum = 30004994) or
              (main.docnum = 30004995) or
              (main.docnum = 30004996) or
              (main.docnum = 30004997) or
              (main.docnum = 30004998) or
              (main.docnum = 30004999) or
              (main.docnum = 30005000)
          )
