How to convert row into column

11-30  Source: Network gathering  Views:0 

Advertisement
Hi All,
My oracle apps version is r12 and db is 10 and i am using Bi publisher version 10g.
Is it possible to convert row into column in Rtf template,
My Query is
SELECT distinct pvs.vendor_site_code,sum(aia.invoice_amount)
FROM ap_invoices_all aia, po_vendors po, po_vendor_sites_all pvs
WHERE aia.org_id = pvs.org_id
AND aia.vendor_id = po.vendor_id
AND aia.vendor_site_id = pvs.vendor_site_id
AND aia.org_id=204
group by pvs.vendor_site_code
And output is like this
Vendor sitecode Invoiceamt
EAM-ERS 79240
STAR GATE - PAY 3245902.31
UPS - HQ 10792040.9
Like this
So in template i need the output like this
Vendor sitecode EAM-ERS STAR GATE - PAY UPS - HQ
Invoiceamt 79240 3245902.31 10792040.9
I tried to achieve the output using sql query but by hardcoding only i have achieved it, so i have tried to convert directly in RTF template.
can any one tell me is it possible.
And if new project is added from the front end ie(now the query will produce 4 rows but now in template i have created only three columns)
Is it possible to add a new column dynamically.
Can any one please guide me and tell me is there any example.
Thanks & regards
Srikkanth
Take a look at this post: http://blogs.oracle.com/roller-ui/bsc/spider.jsp?entry=MT%3aENTRY%3a5001
Thanks,
Bipuser
Related articles
  • How to convert rows into columns with decode function 11-30

    Hi, How to convert rows into columns with the help of decode function in oracle. thanks and regards P Prakashsay col1 col2 1 10 2 20 3 30 then use select col1, sum(decode(col2,10,10)) "new1" sum(decode(col2,20,20))"new2" sum(decode(col

  • How to convert row into column 11-30

    Hi All, My oracle apps version is r12 and db is 10 and i am using Bi publisher version 10g. Is it possible to convert row into column in Rtf template, My Query is SELECT distinct pvs.vendor_site_code,sum(aia.invoice_amount) FROM ap_invoices_all aia,

  • Convert rows into columns nad vice versa in 10g 11-30

    how to convert rows into columns in 10g??Qwerty wrote: see below for rows to column case SQL> WITH t as 2      ( 3       SELECT 'US' test_string FROM DUAL UNION 4       SELECT 'AMERICA'  FROM DUAL UNION 5       SELECT'HOLLYWOOD'  FROM DUAL UNION 6   

  • Converting Rows into Column in Oracle 10g 11-30

    Hi All,                     I m using Oracle Version 10.1.0.2.0 - Production                     I have requirement to convert rows into column wise as per the following:                     My Query is:                     WITH t                    

  • CONVERT ROWS INTO COLUMNS IN INTERNAL TABLE 11-30

    Hi Experts, I want to convert rows into coloumns in final internal table. How to do that one. Can any one help me its very urgent. Regards, PBS.hi, Find the below code for changing rows into colums. data: begin of itab1 occurs 0, fld, end of itab1. d

  • How to convert rows into single columns in Oracle? 11-30

    I have table with data like shown below in Oracle database. P_COLUMN COLUMN_1 COLUMN_2 COLUMN_3 COLUMN_ 4 COLUMN_5 COLUMN_6 COLUMN_7 COLUMN_8 COLUMN_9 COLUMN_10 1 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 1 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 1 C1 C2 C3 C4 C5 C6 C7

  • How to convert data from rows into columns 11-30

    Hi, I have a sql table and the data looks like this GLYEAR GLMN01 GLMN02 GLMN03 GLMN04 2007 -109712.40 6909.15 4758.72 56.88 2007 -13411.32 19132.9 -5585.07 4362.64 Where GLyear reprsents Year and GLMN01 is February, GLMN02 is March and so on, Now i

  • How to convert BLOB into a String 10-11

    Hi, I got a blob column from the database. It contains one XML File. How to convert it into String. I need the code for how to convert the blob into String Thanks in Advance.A blob would be a byte-array, which you can use in the String(byte[]) constr

  • How to convert .class into .jar file 10-11

    Hi, How to convert .class into .jar filejsf_VWP5.5.1 wrote: Hi, How to convert .class into .jar fileFrom a command prompt, cd to the location of your .class file(s). If you want to create a simple jar, use: jar -cf Whatever.jar Whatever.class If you

  • How to design rows and columns in sapscript layout 11-30

    Hi friends, Please let me know how to design rows and columns in sapscript layout with example? Thanks, YogeshHi friends, Please let me know how to design rows and columns in sapscript layout with example? Thanks, YogeshRead other 3 answers

  • Display rows into columns in table 11-30

    Hi, I have a table name Ebiz_Upgrade_Task_Status. Here in table there are 8 rows of data with pro_id,pobj_id,cemli_id and confirmation. I am trying to convert all the CONFIRMATION into column wise using the query below SELECT PRO_ID, POBJ_ID, CEMLI_I

  • Query to convert Row to column - Re-posting 11-30

    Hi all, i am re-posting the same requirement, please do the needful. I need a query to convert row value into column delimited by ',' create table tb_row_2_col (id number,val varchar2(100)); insert into tb_row_2_col values (1,'col1'); insert into tb_

  • Query to convert Row to column 11-30

    Hi all, I need a query to convert row value into column delimited by ',' create table tb_row_2_col (id number,val varchar2(100)); insert into tb_row_2_col values (1,'col1'); insert into tb_row_2_col values (1,'col2'); insert into tb_row_2_col values

  • How to convert hex into a string value 10-11

    hei evryone! can anyone please help me on how to convert a hex value into a string suppose.. Example i want to convert 4275646479 which is a hex value, into a string "BUDDY"? how will i do that??? Any suggestion, tutorial site would be appreciat

  • HOW TO CONVERT DATE INTO NUMBERS 10-11

    HI, what the syntax for converting date into No. Ex from the first date of the month till current date how many days are there, this No of days needs to be divided by the net sale of the month. i have searched in formulas fields but i am not able to

  • How to display Rows as Columns in JSF? 11-30

    I am using dataTable component to get data for my Menu, i have one column in it which returns me the data, because its automatically adding <tr> and <td> tags to it, its showing data in tabular form. I want to show output Horizontally instead

  • Convert rows to Columns in Oracle 11-30

    Hi, The table like Trx         Date PO121 23/11/2008 PO122 24/11/2008 PO123 25/11/2008 I want to convert all the rows to columns like the below table PO121    23/11/2008    PO122    24/11/2008       PO123     25/11/2008 Is it possible in Oracle ?Like

  • How to convert Milliseconds into Date format 11-30

    Hi all, I am getting the output of a variable in milliseconds format, how can I convert it into date format For ex: I am getting input variable as 1366664691000 and I need to convert it to April 22, 2013 5:04:51 PM EDT ( or of SOA format). is there a

  • How to converts string into numbers 11-30

    As a beginer now i am asking the above question? now i am working with XCode 4.3I responded to you here > How to convert pages document into...: Apple Support Communities Please do not start duplicate topics Read other 2 answers

  • How to convert pulses into RPM 11-30

    I am using a counter to count the pulses given from a hall sensor to detect the speed of a motor. I can see the pulses on the graph and I have the operation running in a while loop but I am having issues with setting up a fixed time for the counter t