{"id":1006,"date":"2015-09-01T01:24:10","date_gmt":"2015-08-31T23:24:10","guid":{"rendered":"http:\/\/oracle.malin.pl\/?p=1006"},"modified":"2015-09-01T09:50:57","modified_gmt":"2015-09-01T07:50:57","slug":"sql-listagg-wyswietlenie-wynikow-w-jednej-kolumnie","status":"publish","type":"post","link":"https:\/\/oracle.malin.pl\/?p=1006","title":{"rendered":"SQL &#8211; listagg &#8211; wy\u015bwietlenie wynik\u00f3w w jednej kolumnie"},"content":{"rendered":"<p>Witam,<\/p>\n<p>Jak wy\u015bwietli\u0107 wszystkie opisy danej faktury w jednej kolumnie?<\/p>\n<pre lag='SQL'>\r\nselect listagg(description, ' ,') WITHIN GROUP(order by description)\r\n          from AP_INVOICE_LINES_V ail\r\n         where ail.invoice_id = ai.invoice_id\r\n           and ail.line_type_lookup_code = 'ITEM'\r\n<\/pre>\n<p>Je\u017celi chcemy zrobi\u0107 distinct musi u\u017cy\u0107 rexexpa<\/p>\n<p>REGEXP_REPLACE(<br \/>\nlistagg((FND_NUMBER.CANONICAL_TO_NUMBER(rctl.ATTRIBUTE14) * 100), '% ,&#8217;) WITHIN GROUP(order by rctl_tax.TAX_RATE)||&#8217;% &#8217;<br \/>\n,'([^,]+)(,\\1)+&#8217;, '\\1&#8242;)<\/p>\n<p>Luko<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Witam, Jak wy\u015bwietli\u0107 wszystkie opisy danej faktury w jednej kolumnie? select listagg(description, &#8217; ,&#8217;) WITHIN GROUP(order by description) from AP_INVOICE_LINES_V ail where ail.invoice_id = ai.invoice_id and ail.line_type_lookup_code = 'ITEM&#8217; Je\u017celi chcemy zrobi\u0107 distinct musi u\u017cy\u0107 rexexpa REGEXP_REPLACE( listagg((FND_NUMBER.CANONICAL_TO_NUMBER(rctl.ATTRIBUTE14) * 100), &hellip; <a href=\"https:\/\/oracle.malin.pl\/?p=1006\">Czytaj dalej <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":37,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[186],"tags":[73],"_links":{"self":[{"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/1006"}],"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\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1006"}],"version-history":[{"count":6,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/1006\/revisions"}],"predecessor-version":[{"id":1183,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=\/wp\/v2\/posts\/1006\/revisions\/1183"}],"wp:attachment":[{"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1006"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oracle.malin.pl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}