{"id":175,"date":"2007-04-27T07:46:23","date_gmt":"2007-04-27T05:46:23","guid":{"rendered":"http:\/\/oracle.malin.pl\/?p=175"},"modified":"2007-04-27T07:47:54","modified_gmt":"2007-04-27T05:47:54","slug":"sql-sprawdzenie-poprawnosci-przypisanych-klas-kg-do-indeksow-opmodm","status":"publish","type":"post","link":"http:\/\/oracle.malin.pl\/?p=175","title":{"rendered":"SQL &#8211; sprawdzenie poprawno\u015bci przypisanych klas KG do indeks\u00f3w OPM<->ODM"},"content":{"rendered":"<p>select v.item_no, max(v.opm_kg), max(v.odm_kg)<br \/>\nfrom<br \/>\n(<br \/>\nselect m.ITEM_NO, mic.SEGMENT1 opm_kg, &#8221; odm_kg<br \/>\n\t\u00a0 from apps.gmi_item_categories_v1 gic,<br \/>\n\t\u00a0\t\u00a0\t\u00a0\t\u00a0\t\u00a0\t\u00a0 apps.mtl_categories_vl\t\u00a0\t\u00a0\t\u00a0\t\u00a0\t\u00a0 mic,<br \/>\n\t\u00a0\t\u00a0\t\u00a0\t\u00a0\t\u00a0\t\u00a0 apps.ic_item_mst\t\u00a0\t\u00a0\t\u00a0\t\u00a0\t\u00a0\t\u00a0\t\u00a0\t\u00a0\t\u00a0\t\u00a0\t\u00a0 m<br \/>\n\t\u00a0where mic.STRUCTURE_ID = gic.STRUCTURE_ID<br \/>\n\t\u00a0\t\u00a0 and mic.CATEGORY_ID = gic.CATEGORY_ID<br \/>\n\t\u00a0\t\u00a0 and m.ITEM_ID = gic.ITEM_ID<br \/>\n\t\u00a0\t\u00a0 and upper(gic.CATEGORY_SET_NAME) = 'KLASA KG POZYCJI&#8217;<br \/>\nunion all<\/p>\n<p>select msi.segment1, &#8221;opm_kg, t.CATEGORY_CONCAT_SEGS odm_kg<br \/>\n\t\u00a0 from apps.mtl_item_categories_v t, mtl_system_items_b msi<br \/>\n\t\u00a0where msi.inventory_item_id = t.INVENTORY_ITEM_ID<br \/>\n\t\u00a0\t\u00a0 and msi.organization_id = t.ORGANIZATION_ID<br \/>\n\t\u00a0\t\u00a0 and msi.organization_id = 115<br \/>\n\t\u00a0\t\u00a0 and t.CATEGORY_SET_NAME=&#8217;Klasa KG pozycji&#8217;<br \/>\n) v<br \/>\nwhere nvl(v.opm_kg,&#8217;BRAK&#8217;)|| (nvl(v.odm_kg,&#8217;BRAK&#8217;))<&gt;'BRAKBRAK'\ngroup by v.item_no\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>select v.item_no, max(v.opm_kg), max(v.odm_kg) from ( select m.ITEM_NO, mic.SEGMENT1 opm_kg, &#8221; odm_kg \u00a0 from apps.gmi_item_categories_v1 gic, \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 apps.mtl_categories_vl \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 mic, \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 apps.ic_item_mst \u00a0 \u00a0 \u00a0 \u00a0 &hellip; <a href=\"http:\/\/oracle.malin.pl\/?p=175\">Czytaj dalej <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":20,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,9],"tags":[225,226],"_links":{"self":[{"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/175"}],"collection":[{"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=175"}],"version-history":[{"count":0,"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/175\/revisions"}],"wp:attachment":[{"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}