{"id":80,"date":"2007-04-18T11:57:13","date_gmt":"2007-04-18T09:57:13","guid":{"rendered":"http:\/\/oracle.malin.pl\/?p=80"},"modified":"2012-03-09T17:13:40","modified_gmt":"2012-03-09T15:13:40","slug":"select-do-analizy-przyrostu-dokumentow-logistycznych-w-systemie-oebs","status":"publish","type":"post","link":"https:\/\/oracle.malin.pl\/?p=80","title":{"rendered":"Select do analizy przyrostu dokument\u00f3w logistycznych w systemie OeBS"},"content":{"rendered":"<p>Select zlicza dokumenty logistyczne w systemie:<!--more--><\/p>\n<p>&nbsp;<\/p>\n<pre lang='sql'>select 'BO - OPM' as Typ, count(*)\r\nfrom ic_tran_cmp_vw1 a\r\nwhere a.REASON_CODE LIKE 'BO'\r\nand a.co_CODE = 'ORG'\r\nUNION\r\nselect 'RW - OPM' as Typ, count(*)\r\nfrom ic_tran_cmp_vw1 a\r\nwhere a.doc_type in ('ADJI', 'ADJR')\r\nand a.REASON_CODE LIKE 'R%'\r\nand a.co_CODE = 'ORG'\r\nUNION\r\nselect 'PW - OPM', count(*)\r\nfrom ic_tran_cmp_vw1 a\r\nwhere a.doc_type in ('CRER', 'CREI')\r\nand a.REASON_CODE LIKE 'PW%'\r\nand a.co_CODE = 'ORG'\r\nUNION\r\nselect 'WZ-OPM', count(*)\r\nfrom ic_tran_cmp_vw1 a\r\nwhere a.doc_type in ('OMSO')\r\nand a.co_CODE = 'ORG'\r\nUNION\r\nselect 'PZ-OPM', count(*)\r\nfrom ic_tran_cmp_vw1 a\r\nwhere a.doc_type in ('PORC')\r\nand a.co_CODE = 'ORG'\r\nUNION\r\nSELECT 'ZZ', COUNT(*)\r\nFROM PO_HEADERS_ALL\r\nwhere org_id = '106'\r\nUNION\r\nSELECT 'ZS', COUNT(*)\r\nFROM OE_ORDER_HEADERS_ALL\r\nwhere org_id = '106'\r\nUNION\r\nSELECT 'KONTRAKT', COUNT(*)\r\nFROM oe_blanket_headers_ALL\r\nwhere org_id = '106'\r\nUNION\r\nSELECT 'ZAPOTRZEBOWANIA', COUNT(*)\r\nFROM PO_REQUISITION_HEADERS_ALL\r\nwhere org_id = '106'\r\nunion\r\nmts.transaction_source_type_name,\r\ncount(mtl.transaction_id)\r\nfrom mtl_material_transactions mtl, mtl_txn_source_types mts\r\nwhere mtl.transaction_source_type_id = mts.transaction_source_type_id\r\nand mtl.organization_id = '106'\r\ngroup by transaction_source_type_name;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Select zlicza dokumenty logistyczne w systemie:<\/p>\n","protected":false},"author":20,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,9,97],"tags":[225,226],"_links":{"self":[{"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/80"}],"collection":[{"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=80"}],"version-history":[{"count":5,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/80\/revisions"}],"predecessor-version":[{"id":629,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/80\/revisions\/629"}],"wp:attachment":[{"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}