Multiple column heading for sql that returns single column

Hi All,
I have just started using APEX and my apex version is 3.2.0.00.27.
We have a report that displays the output from a query similar to the below one. We are using borderless template and removed the "before each row" and "after each row" values to allow the output displayed in table format.
Now we wanted to include heading for each column displayed in table. We wanted to include headings from a derived value, Example for column1 , heading need to display the sysdate and column2 heading should be sysdate-1 and so on.  But the column attribute tab is having only one column My_rep. Not sure how to se pl/sql type column heading in this case. Could someone please help me to achieve this?
Please let me know if I have missed to provide any other details. Thanks in advance.
select '<tr>
    <td>' || column1    || '</td>' ||
    <td>' || column2    || '</td>' ||
    <td>' || column3    || '</td>' ||
    <td>' || column4    || '</td>' ||
    || '</tr>' My_rep
from mytable

22335813-cfb0-46c4-9bef-b61a46f0de67 wrote:
Please update your forum profile with a real handle instead of "22335813-cfb0-46c4-9bef-b61a46f0de67"
I have just started using APEX and my apex version is 3.2.0.00.27.
Upgrading from this unsupported version to the current 4.2 release is recommended.
When you post a question, always include the following information in addition to the full APEX version number:
Full database version, edition and host OS
Web server architecture (EPG, OHS or APEX listener), server platform, and host OS
Browser(s)/version(s) used
UI/Theme
Templates
Region type (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. To get a detailed answer then it's appropriate for the questioner to take on a significant part of the effort by reproducing the problem on apex.oracle.com before asking for assistance with specific issues, which can then be seen at first hand in a real APEX environment.
we wanted to get a report in Apex with the below format. and we wanted to change background color of each cell depends on the combination of code||status
Heading        sysdate             sysdate-1              sysdate-2                              ...(sysdate-30
======        ======          ========               =======
name         code||status                                   code||status
name                                  code||status
we are using the below query to get this table format. But heading is the issue we are facing now
select '<tr>
    <td>' || name    || '</td>' ||
    '<td style=background-color:' || case when sysdate0='0C' then 'Green' when sysdate0='0I' then 'Red'     when (substr(sysdate0,1,1)!='0' and substr(sysdate0,1,1)='I') then 'Orange'  else 'Yellow' end || '>  &nbsp'  || sysdate0 || '  &nbsp</td>'  ||
    || '</tr>' repcolumn
from
  (select
        a.name,
        max(decode(trunc(a.ardate),trunc(sysdate), a.code||a.STATUS , '' ))   sysdate0,
        max(decode(trunc(a.ardate),trunc(sysdate-30), a.code||a.STATUS , '' )) sysdate30
from
        mytab a
where
        a.ardate>=sysdate-30
group by a.name)
See Re: Matrix report for a custom report template-based solution to a similar problem, with dynamically generated column headings.

Similar Messages

  • JTable - One Column Heading for Two Columns

    Can you adjust the default JTable to have one column heading for two columns of data? Is there a simple span command? I've looked at the api for JTable and JTableHeader and didn't see anything, is there something I'm missing? Any help would be appreciated.

    What i am trying to accomplish is have column 'E' span 2 columns.
    This is my code thus far, however it give the error from my pryor message. I am pretty sure it is because I'm using and Object[][] and a String[] instead of Vectors. What corrections do I need to make in order for my goal of:
    [ A ][ B ][ C ][ D ][ E  ][ F ][ G ]
    [ 1 ][ 2 ][ 3 ][ 4 ][5][6][ 7 ][ 8 ]
    Object[][] data = new Object[ROWS][COLUMNS];
    String[] columnNames = {"A","B","C","D","E","E","F","G"};
    table = new JTable(data, columnNames);
    table.setBackground(Color.white);
    table.addKeyListener(this);
    DefaultTableCellRenderer d = new DefaultTableCellRenderer();
    d.setHorizontalAlignment(JLabel.CENTER);
    table.setDefaultRenderer(table.getColumnClass(0),d);
    for (int i = 0; i < table.getColumnCount(); i++){
    TableColumn aColumn = header.getColumnModel().getColumn(i);
    TableCellRenderer renderer = aColumn.getHeaderRenderer();
    if (renderer == null) {
    renderer = new DefaultTableCellRenderer(){
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column){
    JTableHeader header = table.getTableHeader();
    if (header != null) {
    setForeground(header.getForeground());
    setBackground(header.getBackground());
    setFont(header.getFont());
    setHorizontalAlignment(JLabel.CENTER);
    setText((value == null) ? "" : value.toString());
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
    return this;
    aColumn.setHeaderRenderer(renderer);

  • How to display a Column Header for the characteristic Text column

    Hi All
    Our users want me to provide for a column header for the characteristic text.
    Here is what I mean
    I am reporting 0plant in the rows as key and Text. In the column on Plant Key the column header says Plant but there is no column header for the plant text.
    Eq:
    Plant                                                        Amount
    IE00         Initiator Plant                               244
    IE01         Initiator Plant NJ                          890
    Our users in the plant text column want a dummy column header to be displayed. SInce they download the data from the BW report to Excel and use pivot reporting. How can I introduce a column header for the texts.
    Thanks
    Karen

    Hi Karen,
    I am not sure if this is possible, although Users can ask anything :).
    In Planning we used to predefine cell headings via Macros and creating dummy cells in between.  I am not sure if a similar scenario can work here.
    By default this is not possible in Reports.  In BEx workbooks, you could probably try with Macros.
    Another easy option is to bring the data in the Cube as another field or create a nav. attribute in the master for text and use it as a nav. attr. in the Cube and put it in your Query row alongside.
    -Aby

  • How to show the VALUE as the Column Header using SQL query?

    Hi
    I have a requirement to show the picked value as the column header using SQL query.
    Example:
    ======
    SELECT EMPNO FROM EMP
    WHERE EMPNO=7934;
    Result Should be:
    7934
    7934

    I have a requirement to show the picked value as the column header using SQL query.In sql*plus you can do
    SQL> set verify on
    SQL> def e =  7934
    old: SELECT empno "&&e"  FROM emp  WHERE empno = &&e
    new: SELECT empno "7934"  FROM emp  WHERE empno = 7934
    SQL> SELECT empno "7934"  FROM emp  WHERE empno = 7934
          7934
          7934
    1 row selected.

  • How To avoid column heading for only total line in ALV list Display

    Hi,
    How To avoid column heading for only total line in ALV list Display.

    Hi,
    to change colunm header field catlog is built
    look at the example below
    Changing column text headers
    use this to change, hide, or alter the ALV columns
    CLEAR: gt_fcat.
    READ TABLE gt_fcat WITH KEY fieldname = 'TEXT1' " ***
    *TEXT1 is your field name
       ASSIGNING <gtfcat>.
    IF sy-subrc = 0.
       <gtfcat>-coltext   = 'Date Type'.
       <gtfcat>-no_out    = ' '.
       <gtfcat>-tooltip   = 'Date Type Text from IT0019'.
       <gtfcat>-seltext   = 'IT0019'.
    keep seltext to '' if u want to hide
    ENDIF.
    regards
    austin

  • Substitution string inside PL/SQL generated content (single column source)

    Hi! I have a contents table that contains the HTML source (using the HTML Editor Standard item) stored on a single varchar2 column like this.
    -- some other HTML source here ---
    href="f?p=&APP_ID.:17:&APP_SESSION."
    -- other HTML source here --
    (Sorry, this forum is parsing my HTML source but it's just as simple as that)
    I'm using a PL/SQL Dynamic Content region to select and display my contents using the htp.p procedure. But the problem is the built-in substitution strings in the URL of my content is just displayed as it is. I know that this maybe because htp.p will treat the parameters just like a regular string and the Application Express Engine don't have a chance to parse it. But can somebody show me an alternative solution for this?
    Right now, I'm just using a static HTML region as a temporary solution. But I really am curious on how can this be done using PL/SQL dynamic content region. Or what design is best on content management-like application.
    Thanks!
    Mertz

    Mertz,
    I'm not sure I understand but say your database table's column contains 'Hello the session id is &APP_ID. ...'. Using a PL/SQL region you could emit that column thus:for c1 in (select content_col from content_tab) loop
      htp.p(replace(c1.content_col, '&' || 'APP_ID.', :APP_ID));
    end loop;Splitting up the substitution item name into concatenated strings avoids problems with the Builder doing substitutions when you don't want it to.
    Scott

  • Convert Oracle SQL query to single column output

    Hello All,
    I need to build the query to have multiple columns in a single column with multiple rows.
    select a.customer_trx_id,a.previous_customer_trx_id
    from ra_customer_trx_all a
    where a.customer_trx_id = :customer_trx_id
    here, a.customer_trx_id and a.previous_customer_trx_id are in two columns. I need to bring them into a single column.
    Say: the above output is
    a.customer_trx_id a.previous_customer_trx_id
    123456 87654
    Need to have single column
    As
    123456
    87654
    Please do the needful.
    Thanks,
    Abdul

    Hi,
    Post your question in [SQL and PL/SQL|http://forums.oracle.com/forums/forum.jspa?forumID=75] forum, you would probably get a better/faster response.
    Regards,
    Hussein

  • Removing columns heading for a perticular page in ALV list display

    Dear All,
    For last page of my ALV list display i need to remove columns heading (Strictly for single page only).
    Kindly help me with possible solution.
    I am triggering page break by  using group attribute in the sort catalogue.(  l_v_sortcat-group     = '* '. )
    Best Regards
    Ravishekar Thallapally

    if u can catch the page number,
    while building fieldcat, put the condition
    if sy-page = (page number)
    ls_fielcact-fieldname = fieldname.
    ls_fieldcat-tech = 'X'.
    LS_FIELDCAT-NO_OUT = 'x'.
    modify lt_fielcat from ls_fieldcat.
    but how r u catching page number?? can u pls tell
    endif.
    Message was edited by: Hymavathi Oruganti

  • Multiple line header for ALV

    I am using  CL_SALV_TABLE (List_Display = X) to create a ALV report. I am willing to change it to function module REUSE_ALV_LIST_DISPLAY if it serves my requirement.
    The header for the report needs to be multiple lines (8 lines). How can I accomplish this?
    I looked into the possibility of using TOP_OF_PAGE event but I will have to hard code the vertical positions of the headers and since it is ALV and you can remove columns at will, I dont think this solution will work. Also if the columns are optimized or output length changed by the user, the positioning of the headers will be ruined.
    Currently the header can only be of one line, how can we make the header to display a table of contents.
    H1-L1          H2-L1          H3-L1
    H1-L2          H2-L2          H3-L2
    H1-L3          H2-L3          H3-L3
    H1-L4          H2-L4          H3-L4
    H1-L5          H2-L5          H3-L5
    H1-L6          H2-L6          H3-L6
    H1-L7          H2-L7          H3-L7
    H1-L8          H2-L8          H3-L8
    Thank you.

    Please guide me hw to put internal table field at report header in ALV.
    this is my field catalog.
    wa_fieldcat-row_pos = 1.
      wa_fieldcat-col_pos = 1.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'VBELN'.
      wa_fieldcat-seltext_m = 'SalesOrderNo'.
      wa_fieldcat-outputlen = '10'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Also i wnt to total 4 field at header level and other is detail level.
    Please guide me hw to do.
    thnks
    Bhavesh

  • How to get accurate values for select statement using single column

    Hi All,
    Below is my query which runs fine
    Select Distinct Top 4
    FiscalYearId,
    FiscalMonthOfYearId
    From ODS.Common.tODS_Date
    Inner Join
    UTL.Utility.tUTL_ProcessDate
    On tODS_Date.DateShort < tUTL_ProcessDate.ProcessDate
    And tUTL_ProcessDate.DatabaseName = 'ODS'
    Order By
    FiscalYearId Desc,
    FiscalMonthOfYearId Desc
    Below is the generate output
    FiscalYearId FiscalMonthOfYearId
    2014 2
    2014 1
    2013 12
    2013 11
    But i want to use this query in one of my where clause condition as its being used in the where clause it can only return 1 row.So, i tried something like this
    Select Distinct Top 4
    FiscalMonthOfYearId
    From ODS.Common.tODS_Date
    Inner Join
    UTL.Utility.tUTL_ProcessDate
    On tODS_Date.DateShort < tUTL_ProcessDate.ProcessDate
    And tUTL_ProcessDate.DatabaseName = 'ODS'
    Order By
    FiscalMonthOfYearId Desc
    And the result set of this one gives me the output like
    FiscalMonthOfYearId
    12
    11
    10
    9
    Which is not correct,( if you see the result set above). 
    Can someone please help me with any ides on this.

    If you want to use this query in the WHERE clause, then use it with EXISTS option which allows to return more than 1 column. 
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Displaying Multiple Row Header for Matrix...

    Hi
           Can you please tell me, whether we can display Multiple row headers for the Matrix object same as that in the Posting Period SAP Form...
    Please check the Link: http://img198.imageshack.us/img198/3491/postingperiodform.jpg..
    Thanking you in advance...
    Thanks
    Hari

    I am extremly sorry...Please check the following link...
    Link Address : http://www.freeimagehosting.net/image.php?d499726589.jpg
    Edited by: hari angamaly on Jun 17, 2009 1:20 PM
    Edited by: hari angamaly on Jun 17, 2009 1:21 PM

  • How to give column heading for detailed list

    hi,
    we can get column-heading of basic list by text-element provided.
    but what are ways of giving column heading in detailed list ?

    HI,
    Based on the SY-LSIND value, you can have a different heading.
    top-of-page at line-selection.
    case sy-lsind.
    when 1.
    write:/ 'Heading for first list'.
    when 2.
    write:/ 'Heading for second list'.
    when 3.
    write:/ 'Heading for third list'.
    endcase.
    please see the link below it might help you
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba2eb35c111d1829f0000e829fbfe/content.htm
    *******please reward points if the information is helpful to you*************

  • Column header for file append ?

    My output txt file is getting appended eachtime. If i need to have my column header, everytime the data is appended the header is added as new line as well. I use parameter 'Data.addHeaderLine = 1' on my FCC.
    Current:
    H1                H2                  H3      
    8810             0000054270    0000166909 
    H1                H2                  H3
    5410         0000054072    A1857276
    Actual
    H1                H2                  H3
    8810             0000054270    0000166909 
    5410         0000054072    A1857276

    How is your outbound message structured ?
    Are these two messages which are getting appended on the receiving end. If it is, check the receiver file adapter, which has options to create a new file than appending to existing file.

  • Column Header for Select AS kind of query

    Hi,
    I wish to write a csv file by using the odisqlunload function. I have wrote the funtion as :
    OdiSqlUnload "-FILE=#FILE_PATH/#FILE_NAME" "-DRIVER=<%=odiRef.getInfo("SRC_JAVA_DRIVER")%>" "-URL=<%=odiRef.getInfo("SRC_JAVA_URL")%>" "-USER=<%=odiRef.getInfo("SRC_USER_NAME")%>" "-PASS=<%=odiRef.getInfo("SRC_ENCODED_PASS")%>" "-FILE_FORMAT=VARIABLE" "-FIELD_SEP=," "-ROW_SEP=\r\n" "-DATE_FORMAT=yyyy/MM/dd HH:mm:ss" "-CHARSET_ENCODING=ISO8859_1" "-XML_CHARSET_ENCODING=ISO-8859-1" "-FETCH_SIZE=1000" "-QUERY=SELECT RPAD(CI_FT_GL.GL_ACCT, 31, ' '),LPAD(CASE WHEN CI_FT.CURRENCY_CD != CI_FT_GL_EXT.DIVISION_CURCY_CD THEN sum(CI_FT_GL_EXT.DIVISION_AMT) ELSE sum(CI_FT_GL.AMOUNT) END,17,' '),' ',RPAD(CI_DST_CD_CHAR.CHAR_VAL, 25, ' '),RPAD(CI_DST_CD_CHAR.DST_ID, 8, ' '),'RMB ',' ',RPAD(to_char(sysdate, 'YYYYMMDD'), 8, ' ') FROM CI_DST_CD_CHAR CI_DST_CD_CHAR,CI_FT CI_FT,CI_FT_GL CI_FT_GL,CI_FT_GL_EXT CI_FT_GL_EXT where (CI_FT.FT_ID = CI_FT_GL.FT_ID) AND (CI_FT_GL.FT_ID = CI_FT_GL_EXT.FT_ID(+)) AND CI_FT_GL.GL_SEQ_NBR = CI_FT_GL_EXT.GL_SEQ_NBR(+) AND (CI_FT_GL.DST_ID = CI_DST_CD_CHAR.DST_ID) AND (CI_DST_CD_CHAR.CHAR_TYPE_CD = 'DTLREF1') AND (trim(CI_FT_GL.GL_ACCT) is not null) AND (CI_FT.XFER_TO_GL_DT is null) AND (CI_FT.GL_DISTRIB_STATUS in ('G','M')) AND (trunc(CI_FT.SCHED_DISTRIB_DT) <= trunc(sysdate)) AND CI_FT.CIS_DIVISION = '#DIVISION' GROUP BY CI_FT_GL.GL_ACCT,CI_DST_CD_CHAR.CHAR_VAL,CI_DST_CD_CHAR.DST_ID,CI_FT.CURRENCY_CD,CI_FT_GL_EXT.DIVISION_CURCY_CD"
    Then i used a jython code to generate headers. Bcoz the OdiSqlUnload does not generate headers. But the jython code is not useful when we have sql statements lik 'Select AS' :
    SELECT RPAD(CI_FT_GL.GL_ACCT, 31, ' ') AS GL_ACCT,
    LPAD(CASE WHEN CI_FT.CURRENCY_CD != CI_FT_GL_EXT.DIVISION_CURCY_CD THEN sum(CI_FT_GL_EXT.DIVISION_AMT) ELSE sum(CI_FT_GL.AMOUNT) END,17,' ') AS GL_AMOUNT,
    My Jython code is:
    import string
    import java.sql as sql
    import java.lang as lang
    import re
    sourceConnection = odiRef.getJDBCConnection("SRC")
    output_write=open('d:/Bijal/output1.csv','r+')
    myStmt = sourceConnection.createStatement()
    my_query = "SELECT RPAD(CI_FT_GL.GL_ACCT, 31, ' ') AS GL_ACCT,
    LPAD(CASE WHEN CI_FT.CURRENCY_CD != CI_FT_GL_EXT.DIVISION_CURCY_CD THEN sum(CI_FT_GL_EXT.DIVISION_AMT) ELSE sum(CI_FT_GL.AMOUNT) END,17,' ') AS GL_AMOUNT,
    ' ' AS BLANK1,
    RPAD(CI_DST_CD_CHAR.CHAR_VAL, 25, ' ')AS DESCR,
    RPAD(CI_DST_CD_CHAR.DST_ID, 8, ' ')AS DST_ID,
    'RMB ' Currency_Cd,
    ' ' AS BLANK2,
    RPAD(to_char(sysdate, 'YYYYMMDD'), 8, ' ') AS DT_OF_TXN
    FROM CI_DST_CD_CHAR CI_DST_CD_CHAR,CI_FT CI_FT,CI_FT_GL CI_FT_GL,CI_FT_GL_EXT CI_FT_GL_EXT
    where (CI_FT.FT_ID = CI_FT_GL.FT_ID) AND (CI_FT_GL.FT_ID = CI_FT_GL_EXT.FT_ID(+)) AND
    CI_FT_GL.GL_SEQ_NBR = CI_FT_GL_EXT.GL_SEQ_NBR(+) AND (CI_FT_GL.DST_ID = CI_DST_CD_CHAR.DST_ID)
    AND (CI_DST_CD_CHAR.CHAR_TYPE_CD = 'DTLREF1') AND (trim(CI_FT_GL.GL_ACCT) is not null)
    AND (CI_FT.XFER_TO_GL_DT is null) AND (CI_FT.GL_DISTRIB_STATUS in ('G','M')) AND
    (trunc(CI_FT.SCHED_DISTRIB_DT) <= trunc(sysdate)) AND CI_FT.CIS_DIVISION = 'MF'
    GROUP BY CI_FT_GL.GL_ACCT,
    CI_DST_CD_CHAR.CHAR_VAL,
    CI_DST_CD_CHAR.DST_ID,
    CI_FT.CURRENCY_CD,
    CI_FT_GL_EXT.DIVISION_CURCY_CD"
    my_query=my_query.upper()
    if string.find(my_query, '*') > 0:
    myRs = myStmt.executeQuery(my_query)
    md=myRs.getMetaData()
    collect=[]
    i=1
    while (i <= md.getColumnCount()):
    collect.append(md.getColumnName(i))
    i += 1
    header=','.join(map(string.strip, collect))
    elif string.find(my_query,'||') > 0:
    header = my_query[7:string.find(my_query, 'FROM')].replace("||','||",',')
    else:
    header = my_query[7:string.find(my_query, 'FROM')]
    print header
    old=output_write.read()
    output_write.seek(0)
    output_write.write (header+'\n'+old)
    sourceConnection.close()
    output_write.close()
    But it does not populate for Select As statements and throws error lik:
    'mismatched character \'\\n\' expecting \'"\'', ('<string>', 8, 62, 'my_query = "SELECT RPAD(CI_FT_GL.GL_ACCT, 31, \' \') AS GL_ACCT,\n'))
    Plz help me get headers in my output file :)

    Solution1:
    Still you can achieve this by using sys_connect_by_path ( if you know the use of it) to generate header. below link can help with another approach.
    http://www.business-intelligence-quotient.com/?p=546
    Solution2:
    You need to create one file (header= true )with interface as suggested by sutirtha. Then you can copy (odifilecopy) this file to another directory with dynamic name (inside variable) and dynamic path. In this interface keep the truncate option to true so that everytime data wont be appended to the end of file. After reversing the file change the column name Manually from C1 to your ACTUAL_COL_NAME in file. Because ODI always generate the column names using C1,C2,C3 ....
    The only risk in second approach is that if someone will delete the file then you will get error. For this you need to create a temp table in ODI with all column-name (header in file). then using above jython code or sys_connect_by_path (select * from temp_table), you can generate the header easily. Now this file will be generated dynamically and can be used by the interface. So even if someone will delete the file you can generate it during run time.
    Thanks.

  • Need to return dynamic column names for a function returning nested table

    I am having a pl/sql function which is returning a nested table.
    For this i have defined an object which is having 4 attributes- 1 number type, 3 varchar2 type -p1,p2,p3.
    My function is taking input parameter v1,v2,v3 all of varchar2 type.Inside the function body,i am using these (v1,v2,v3) to filter data from an sql query and i am also
    using pivot function in this sql query.
    At the end my function is returning the object as defined in the starting .
    When i am excuting this function,thru select statement :
    select * from table(f1_test('A','B','C'));
    i am geting p1,p2,p3 as column name ,which are names used when i had defined object type.Instead i want column name to be dynamic (wotever i am passing in function as
    parameter while executing the function ,here A,B,C)
    Please help me in geting column names dynamic as passed in input parameter (i.e A,B,C for this case )
    Sample code for the problem:
    create or replace TYPE obj1 AS OBJECT
    ( id number(5,0)
    ,p1 varchar2(10),
    ,p2 varchar2(10)
    ,p3 varchar2(10)
    create or replace TYPE tt1 AS TABLE OF OBJ1;
    create or replace
    function f1_test (v1 varchar2,v2 varchar2,v3 varchar2)
    return tt1 as
    v_return tt1 ;
    v_str varchar2(30000);
    begin
    v_str:='
    select
    cast(
    multiset(
    select * from
    select
    aa.report_id
    ,cc.name
    ,e.amount
    from
    aa,cc,e
    where
    <join conditions>
    and cc.name in ('''||v1||''','''||v2||''','''||v3||''')
    pivot (sum (amount) for name in ('''||v1||''' as '||v1||','''||v2||''' as '||v2||','''||v3||''' as '||v3||'))
    as tt1)
    from
    dual';
    dbms_output.put_line(v_str);
    execute immediate v_str
    into
    v_return ;
    return v_return;
    end;
    Edited by: 845831 on 20 Mar, 2011 12:15 PM

    select id,p1 A,p2 B,p3 C from table(f1_test('A','B','C'));
    drop function f1_test;
    drop type tt1;
    drop type obj1;
    create or replace TYPE obj1 AS OBJECT
    ( id number(5,0)
    ,p1 varchar2(10)
    ,p2 varchar2(10)
    ,p3 varchar2(10)
    create or replace TYPE tt1 AS TABLE OF OBJ1;
    CREATE OR REPLACE
      FUNCTION f1_test(
          v1 VARCHAR2,
          v2 VARCHAR2,
          v3 VARCHAR2)
        RETURN tt1
      AS
        v_return tt1 ;
        v_str VARCHAR2(30000);
      BEGIN
        v_str:='select cast(multiset(select 1,''20'',''30'',''40'' from dual) as tt1) from dual';
        dbms_output.put_line(v_str);
        EXECUTE immediate v_str INTO v_return ;
        RETURN v_return;
      END;
    /

Maybe you are looking for

  • Centering Headers and Footers in Adobe Acrobat 9

    I've read past posts about the inability to center a multi-line header or footer in Adobe Acrobat 9, and the fact that it was not fixed in Acrobat 9.  Is anyone working on a fix, other than manually entering spaces to center the header or footer?  Th

  • Geforce Nightmares - crash/lock-ups

    Hi, I'll start this story from the beginning so you can see the full frustration of my problem. If you do not want to read the introduction skip straight past the line of **'s to the problem itself: I bought an MSI ge-force 4 TI 4600 a few weeks ago

  • Using VO Attribute in destination URI of Item Style LINK in OAF Personalization

    Extended the VO in iReceivables to have a Transaction link (external URL) as additional view attribute 'InvoiceUri' (i.e. each TRX will have a unique URL from 3rd party) Now trying to add a LINK type Item in the same and proving the VO Attribute as D

  • 17" CRT monitor snaps and flickers

    For the past week or so, when I've been using my G4 mac, the 17" CRT would periodically make a soft snap followed by the display pulsing (image getting bigger, then smaller, then settling out). The other day, I booted up the computer, and the monitor

  • What are "nsurlsessiond" and "AssetCacheLocatorService"?

    Little Snitch is catching these processes trying to connect to various servers (and not Apple ones) at least once per hour. What are they? Should I just let them go?