Total Pageviews

Showing posts with label Oracle : SQL. Show all posts
Showing posts with label Oracle : SQL. Show all posts

Saturday, 29 July 2023

Oracle : Useful SQL Query

 

SQL Query

1) generate Serial number in SQL Query

select row_number() over(partition by part_no order by part_no,decode(ORDER_TYPE_TEXT,'On Hand','01','02') from dual;




*************************************************************************************

#SQL Query #Oracle #Oracle Apps #Oracle #

Sunday, 16 July 2023

Oracle : How to convert Column to Row in SQL in Oracle Apps (r12)

Convert Text (column) to Row in Oracle Apps


SELECT REGEXP_SUBSTR(p_inv_org_id,'[^,]+', 1, LEVEL) COL1 FROM DUAL

                               CONNECT BY LEVEL <= REGEXP_COUNT(p_inv_org_id, ',') + 1


===========================================================================

#SQL QUERY #Oracle Apps #EBS #Column to Row conversion #PLSQL #r12 #REGEXP

FUSION: Purchasing Query

  1) ---------CPA to PO Amount---------- select poh.segment1, (select sum(nvl(cpol.quantity,1)* cpol.unit_price) from po_headers_all cpoh,po...