Dynamic columns rows

Hi all
I have a table with columns, rows and data mentioned below.

col1 col2
2B
1 B
2 C
1 g
3A
3B
3 C

I want the data as

col1 col2 col3 col4
1 A AND B
2 C D
3 C

But the data can be added up to 100 or 200 (dynamic)

I tried with pivot, but doesn't work for dynamic values. Is it possible to do with queries or procedure. Please suggest.

Thanlks

Vermorel

A typical pivot is done something like this (pre 11g)...

SQL> ed
Wrote file afiedt.buf

  1  with t as (select 1 as col1, 'A' as col2 from dual union all
  2             select 1, 'B' from dual union all
  3             select 2, 'C' from dual union all
  4             select 2, 'D' from dual union all
  5             select 3, 'A' from dual union all
  6             select 3, 'B' from dual union all
  7             select 3, 'C' from dual)
  8  --
  9  -- end of test data
 10  --
 11  select col1
 12        ,max(decode(rn,1,col2)) as val1
 13        ,max(decode(rn,2,col2)) as val2
 14        ,max(decode(rn,3,col2)) as val3
 15  from (select col1, col2, row_number() over (partition by col1 order by col2) as rn from t)
 16  group by col1
 17* order by col1
SQL> /

      COL1 V V V
---------- - - -
         1 A B
         2 C D
         3 A B C

The number of columns in the output, must be known at the time where the query is analyzed. If you cannot easily base the number of columns on the data itself, without writing dynamic code.

Dynamically, you can change your procedure like that...

SQL> create table t as (select 1 as col1, 'A' as col2 from dual union all
  2                     select 1, 'B' from dual union all
  3                     select 2, 'C' from dual union all
  4                     select 2, 'D' from dual union all
  5                     select 3, 'A' from dual union all
  6                     select 3, 'B' from dual union all
  7                     select 3, 'C' from dual)
  8  /

Table created.

SQL> ed
Wrote file afiedt.buf

  1  create or replace procedure data_1( p_cursor in out sys_refcursor ) is
  2    l_stmt  varchar2(32767);
  3    l_cnt   number;
  4  begin
  5    select max(count(*)) into l_cnt from t group by col1;
  6    l_stmt := 'select col1 ';
  7    for x in 1..l_cnt
  8    loop
  9      l_stmt := l_stmt||',max(decode(rn,'||x||',col2)) val_'||x;
 10    end loop;
 11    l_stmt := l_stmt||' from (select col1, col2, row_number() over (partition by col1 order by col2) as rn from t) group by col1 order by col1';
 12    open p_cursor for l_stmt;
 13* end;
SQL> /

Procedure created.

SQL> var rc refcursor;
SQL> exec data_1(:rc);

PL/SQL procedure successfully completed.

SQL> print rc;

      COL1 V V V
---------- - - -
         1 A B
         2 C D
         3 A B C

SQL>

Tags: Database

Similar Questions

  • Adding dynamic columns to datagrid at the beginning of the datagrid

    Hello friends,

    There is a datagrid that is static. and I m adding a dynamic column. It is added at the end of the static data grid

    but I want to add dynamic at the begning of the datagrid column can someone help me on this.

    Thanking you,

    Kind regards

    Gallot

    datagridfeeamount.dataProvider = new ArrayCollection (event.result.rows.row) collection;

    the word 'new', after that the = was supposed to be red and larger

  • Extraction of dynamic columns in table

    I have table with 1000 rows and 200 columns. The columns have additional suffix IE
    Table = 'X '.
    Columns = ID, A, B, C, D1, D2, D3... D200

    I would like to get the values of each column so that I can treat them accordingly.


    OPEN c1 to SELECT * FROM X

    LOOP
    C1 FETCH BULK COLLECT INTO l_dies;

    FOR indx IN 1... l_dies. COUNTY
    LOOP
    FOR indx to 0... 200
    LOOP
    colStr: = l_dies (indx). || » D'|| INDX; <-trying to dynamic column of concat name, but it gives an error.
    Dbms_output.put_line ('indx =' | indx |) 'col = value' | colStr);
    END LOOP;
    END LOOP;
    END LOOP;

    Maybe it's not the right way, but just an example of what I want to achieve.

    Thanks in advance.

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:1035431863958

    Visit this link especially the very first post of Tom (Proc print_table).

    I hope this helps.

    Concerning

    REDA

  • dynamic columns

    I use

    DB 10g Release 10.2.0.1.0

    Oracle 6i 6.0.8.8.3 reports

    in the table below.

    How can I have the dynamic columns 'fault' in reports in the order of its highest value of occur_times.

    and a view that gives me no reports (formats below).

    CREATE TABLE dem

    (trid NUMBER (9.0),)

    tr_date DATE,

    point VARCHAR2 (10),

    failure VARCHAR2 (5).

    occur_times NUMBER (9.0))

    /

    INSERT INTO dem

    VALUES

    (1, 26 - JAN 2016', 'MC', 'AB', 3)

    /

    INSERT INTO dem

    VALUES

    (2, 26-JAN 2016', 'MC', 'FM', 2)

    /

    INSERT INTO dem

    VALUES

    (3, 26 - JAN 2016', 'MC', 'SO', 5)

    /

    INSERT INTO dem

    VALUES

    (4, 27 - JAN 2016', 'MC', 'AB', 8)

    /

    INSERT INTO dem

    VALUES

    (5, 27-JAN 2016', 'MC', 'FM', 2)

    /

    INSERT INTO dem

    VALUES

    (6, 27-JAN 2016', 'MC', 'SO ', 1).

    /

    Commit

    /

    example1

    "Report of input parameter: count 26 January 2016 ' to 26 January 2016"

    Output format of report

    point defects Total SW AB FM

    -------   ----------------   ----    -----  -----

    MC                10       5      3      2

    e.g.2

    "Report of input parameter: count 26 January 2016 ' January 27, 2016"

    Output format of report

    point defects Total FM SW AB

    -------   ----------------   ---------  -----

    21 11 6 4 MC

    in example1 in date range, the flaws in the order of its value max occur_times is FM SW, AB,

    but in e.g.2. in view of the date range default by order of its value max occur_times is AB, SW, FM

    THE FAULT of MAX VALUE should take precedence i.e. dynamically in the reports.

    concerning

    teefu

    Lahore, pakistan.

    You must create the parameter in the oracle reports. When the report of the form calling create the parameter list and then pass the required parameter.

    SELECT the item,

    fault,

    Sum (occur_times) tot_times,

    ROW_NUMBER() over (ORDER BY SUM (occur_times) DESC) rn

    DEM

    WHERE the fault ("AB", "FM", "SW")

    AND tr_date BETWEEN TO_DATE(:p_dt1,'dd-Mon-yyyy') AND TO_DATE(:p_dt2,'dd-Mon-yyyy')

    GROUP BY item, fault

    ;

  • Dynamic columns based on the user login

    Dear Experts,

    Is it possible to display the columns dynamically according to the connection of the BI Publisher user?

    For example, if the report of RTF model has 10 columns in total and if I connect with a user named "abc", I should be able to see, say 6 columns containing information about the user "abc".

    And if I have connection with "xyz", I should be able to see, say 7 columns containing information about the user "xyz".

    I will be able to assign to which column should be displayed to the user who?

    If there is a way to achieve this scenario, please let me know as soon as possible, since there is an urgent need.

    Your help will be very appreciated.

    Thanks in advance!

    Yes, using: xdo_user_name in the SQL data model, you can get the details for user identification.

    Then use this model column RTF for display of the dynamic columns.

    Example:

    Select: xdo_user_name as USER_ID of the double

    In RTF

    Column header

    Column data

  • OBIEE dynamic column headings based repository Variables

    Hello

    How can we provide variable name of the repository (from RPD) as column headings in reports (presentation Services).

    Can you please suggest me how to do it?

    Thanks in advance...

    RAM

    Hello

    You can use the following link.

    Oracle Business Intelligence 11g: OBIEE 11 g dynamic column headings

    I used the variable presentation here, you can substitute the variable repository. The difference is that you don't need to create variable presentation, instead you use repository variable there.

    If you are not clear with this, pleas come back. I'll write a new message on your problem.

  • OBIEE 11 g dynamic column headings

    I doubt I should do some dynamic column headings in OBIEE 11 g

    I have guest months (1,2,3...)

    but in the report I want column header to be something as if showing 1 do Jan...

    How to achieve this and is for the column headers!

    Thank you

    NK

    I fixed that with a dummy work around

    created a new prompt and pass values of the previous message and put this quick as a filter on the dashboard (dashboard properties).

    and used this new prompt variable as a header for the report

    He worked

    Thank you

    NK

  • Creating a dynamic column editable

    I tried to make my dynamic columns as editable. The problem is that my dynamic columns are nested.

    Now editable column works fine when I have diff columns with a different name. For example, col1, col2, col3 (not nested)

    Or I nested columns like "pass"(parent) given two columns col1 and col2. ".

    But, when I use them in a dynamic of columns in which all of them have the same name, in the example below, each with the same name 'col', I can change all of them, but the textfield never faded away, when I click on ENTER.


    Suppose I have an editable column with col name:
    for (final CategoryTypeVO type : typeList)
                    {
                           TableColumn<ItemVO, Integer> col = new TableColumn<ItemVO, Integer>(type.getTypeName());
                          col.setMinWidth(100);
                          col.setEditable(true);
                          col.setCellFactory(cellFactory);
                         
                         
                          col.setOnEditCommit(
                                   new EventHandler<TableColumn.CellEditEvent<ItemVO, Integer>>() {
                                   public void handle(TableColumn.CellEditEvent<ItemVO, Integer> t) {
                                   ((ItemVO)t.getTableView().getItems().get(
                                   t.getTablePosition().getRow())).getListType().get(type.getTypeId()).setQuantity(t.getNewValue());
                                   }
                                   });
                           quantity.getColumns().add(col);
                         }
    and cellfactory as:
    final Callback<TableColumn<ItemVO, Integer>, TableCell<ItemVO, Integer>> cellFactory = new Callback<TableColumn<ItemVO, Integer>, TableCell<ItemVO, Integer>>() {
                        public TableCell call(TableColumn p) {
                             return new EditingCell();
                        }
                   };
    and Editing class as
    class EditingCell extends TableCell<ItemVO, Integer> {
               
               private TextField textField;
              
               public EditingCell() {}
              
               @Override
               public void startEdit() {
                   super.startEdit();
                  
                   if (textField == null) {
                       createTextField();
                   }
                  
                   
                   setGraphic(textField);
                   setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
                   textField.selectAll();
                   Platform.runLater(new Runnable() {
                       @Override
                       public void run() {
                           textField.requestFocus();
                       }
                  });
               }
              
               @Override
               public void cancelEdit() {
                   super.cancelEdit();
                  
                   setText(String.valueOf(getItem()));
                   setContentDisplay(ContentDisplay.TEXT_ONLY);
               }
          
               @Override
               public void updateItem(Integer item, boolean empty) {
                   super.updateItem(item, empty);
                  
                   if (empty) {
                       setText(null);
                       setGraphic(null);
                   } else {
                       if (isEditing()) {
                           if (textField != null) {
                               textField.setText(getString());
                           }
                           setGraphic(textField);
                           setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
                       } else {
                           setText(getString());
                           setContentDisplay(ContentDisplay.TEXT_ONLY);
                       }
                   }
               }
               
              
               
          
               private void createTextField() {
                   textField = new TextField();
                   //textField.setText(getString());
                   textField.setText("0");
                   textField.setMinWidth(this.getWidth() - this.getGraphicTextGap()*2);
                   
                   textField.focusedProperty().addListener(new ChangeListener<Boolean>() {
    
                          @Override
                          public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2) {
                              if (!arg2) {
                                  commitEdit(Integer.parseInt(textField.getText()));
                              }
                          }
                      });
                   
                   textField.setOnKeyReleased(new EventHandler<KeyEvent>() {
                       @Override public void handle(KeyEvent t) {
                           if (t.getCode() == KeyCode.ENTER) {
                               commitEdit(Integer.parseInt(textField.getText()));
                           } else if (t.getCode() == KeyCode.ESCAPE) {
                               cancelEdit();
                           }
                       }
                   });
               }
    
              
               private String getString() {
                   return getItem() == null ? "" : getItem().toString();
               }
    Now what happens is this thing works fine if I separate columns with distinct names. But when it comes to dynamic columns, it fails, once I have edit a cell, the text field never leaves his place. It gets stuck in the cell. Any help!

    Published by: abhinay_a on January 21, 2013 12:31 AM

    Do not know what is the problem in your code, but it is easier to use TextFieldTableCell than building your own TableCell from scratch.

    This change to the example I posted in How to create a tableview for this? works for me:

    package itemtable;
    
    import javafx.application.Application;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.scene.Scene;
    import javafx.scene.control.ChoiceBox;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableColumn.CellDataFeatures;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.control.cell.TextFieldTableCell;
    import javafx.scene.layout.BorderPane;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    import javafx.util.converter.NumberStringConverter;
    
    public class ItemTable extends Application {
    
      @Override
      public void start(Stage primaryStage) {
        final DAO dao = new MockDAO();
        final ChoiceBox choiceBox = new ChoiceBox();
        choiceBox.getItems().setAll(dao.getCategories());
    
        final TableView table = new TableView();
    
        // Make table editable:
        table.setEditable(true);
    
        final TableColumn nameCol = new TableColumn("Name");
        nameCol.setCellValueFactory(new PropertyValueFactory("name"));
        nameCol.setCellFactory(TextFieldTableCell.forTableColumn());
        final TableColumn priceCol = new TableColumn("Price");
        table.getColumns().addAll(nameCol, priceCol);
    
        choiceBox.getSelectionModel().selectedItemProperty()
            .addListener(new ChangeListener() {
              @Override
              public void changed(ObservableValue observable, Category oldValue, Category newValue) {
                table.getItems().clear();
                priceCol.getColumns().clear();
                for (final Type type : newValue.getTypes()) {
                  final TableColumn col = new TableColumn(type.getName());
                  col.setCellValueFactory(new Callback, ObservableValue>() {
                    @Override
                    public ObservableValue call(CellDataFeatures cellData) {
                      Item item = cellData.getValue();
                      if (item == null) {
                        return null;
                      } else {
                        return item.priceProperty(type);
                      }
                    }
                  });
    
                  // Make column editable:
                  col.setEditable(true);
                  col.setCellFactory(TextFieldTableCell.forTableColumn(new NumberStringConverter()));
    
                  priceCol.getColumns().add(col);
                }
                table.getItems().setAll(dao.getItemsByCategory(newValue));
              }
            });
    
        BorderPane root = new BorderPane();
        root.setTop(choiceBox);
        root.setCenter(table);
    
        Scene scene = new Scene(root, 600, 600);
        primaryStage.setScene(scene);
        primaryStage.show();
      }
    
      public static void main(String[] args) {
        launch(args);
      }
    }
    

    Edited by: James_D January 22, 2013 07:22

  • How to identify the last instance of a dynamic table row

    Hi all

    I'm trying to figure out how to create an action for my form in Livecycle Designer ES2, which will affect the last instance of a dynamic table row. I have a table with a repeatable row where the user will enter information about a part purchased and I have buttons that allow the user to add and remove the lines. I need to create a line extra addition button which will add a new instance of the repeatable table line (this is not a problem) and disable and change the background color of the first cell in the row added. The problem I have is how to have an action that affects the last instance of a line.

    If anyone knows how to do this in Javascript, I would appreciate some advice/help.

    Hello

    I think that it is beyond providing an action. You will have a need to write JavaScript directly.  When you call the addInstance method it returns the new line, if you can do something like;

    var line = Table1._Row1.addInstance ();

    line. TextField1.border.fill.color.value = "255,0,0";

    line. TextField1.access = 'protected ';

    To find the last line and do the same thing, you can do something like;

    var line = Table1.resolveNode ("Row1 [" + (Table1._Row1.count - 1) + "" "]" ");

    line. TextField1.border.fill.color.value = "255,0,0";

    line. TextField1.access = 'protected ';

    Concerning

    Bruce

  • Dynamic columns in dashboard prompt

    Hi all
    I have to 'TOP' dispay & dynamic value 'BOTTOM' in the drop-down list of the dashboard invites the creation of a dynamic column value in the drop-down list prompt dashboard? I'm trying to create in writing view sql result but not getting does not correctly according to the selection of HIGH and low, I must make a report changes
    SELECT CASE WHEN 1=0 THEN ExistedPresentationColumn ELSE 'TOP' END FROM SubjectArea
    
    UNION ALL
    
    SELECT CASE WHEN 1=0 THEN ExistedPresentationColumn ELSE 'BOTTOM' END FROM SubjectArea
    
  • Missing cells in the table of dynamic columns

    Hello

    I am creating a table using dynamic columns. Here's an example simplified data that I use:

    < sales >
    ... < drive >
    ... Honda < brand > < / brand >
    ... < color > green < / color >
    ... < / car >
    ... < drive >
    ... Nissan < brand > < / brand >
    ... < color > blue < / color >
    ... < / car >
    ... < drive >
    ... Honda < brand > < / brand >
    ... < color > blue < / color >
    ... < / car >
    < sales >

    I am grouping the brands for the lines, and I want a number of colors as my dynamic column. I find myself with a table that looks like this:

    ----------------------------------------------------------------------------------
    Brand | Blue | Green |
    ----------------------------------------------------------------------------------
    Honda | 1. 1.
    ----------------------------------------------------------------------------------
    Nissan | 1
    --------------------------------------------------------

    Since there is no green Nissan, a cell not created so I find myself with a hole in my table. Ideally, I would want a cell containing 0 to be in this space.
    Is it possible, or to all the least have a cell in this space, so I did not have a table with gaps?

    Thank you!

    Hi cc22

    If you have a look at these. http://winrichman.blogspot.com/search/label/cross%20tab
    you will identify yourself,

    its simple... If this is not the case, let me know.

  • Allow users to dynamically add rows

    Hello

    During the creation of form, I found an option "allow users to dynamically add rows. I need so that users must be able to create new lines if necessary for new TBHs. How does this option, could someone let me know?

    Thank you

    IDI

    Hello

    If the user has write access to the form and the option is selected to "Allow users to dynamically add lines", when the user runs the form that it has the option in the menu (Edit > Add Row)
    Then, this will open a window where the user can select the members for the dimension of the row to which it has access.

    The function does not work if you have selected "remove Missing Data".

    Useful, correct, answered? you know that you can do.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Help by calling the dynamic columns in anonymous blocks

    my code:

    DECLARE
    col1 VARCHAR2 (20): = "City";

    BEGIN
    I'm in (select * from xbd.cus_ord where rownum < 10)
    LOOP
    - I would call col1 dynamically here in my outings DBMS.
    DBMS_OUTPUT. Put_line (i.col1);
    END LOOP;
    END;
    /


    The code above I tried to call a dynamic column. How can I do that.
    I Heve been tried differently using EXECUTE IMMEDIATE. It still does not work.

    THX,
    VI
    DECLARE
       col1        VARCHAR2(30)   := 'object_name';
    
       TYPE REF_CURSOR IS REF CURSOR;
    
       refCursor   REF_CURSOR;
       text        VARCHAR2(4000);
    BEGIN
       OPEN refCursor FOR 'SELECT ' || col1 || ' FROM all_objects WHERE ROWNUM < 10';
    
       LOOP
          FETCH refCursor
           INTO text;
    
          EXIT WHEN refCursor%NOTFOUND;
          DBMS_OUTPUT.PUT_LINE(text);
       END LOOP;
    END;
    /
    
  • Referring to the dynamic cursor rows and columns in SQL

    I have a procedure that dynamically reads a schema name and a table name in a table entry. The code must loop through all the rows and the columns in each table and the output data. I'm done with what I want to achieve 95%, but there is a little bug. The dbms_output.put(*col.column_name* ||) line '',''); ' ||
    return to something like rec.col.column_name , so that it is the column of the current record. Currently, it simply displays the name of the column for each record instead of the actual value. Can someone help me to change the code to get the real value?

    CREATE OR REPLACE PACKAGE BODY some_proc
    -Function and procedure implementations
    PROCEDURE create_files IS
    CURSOR c_tbls IS
    SELECT * FROM tbl_list;
    l_sql VARCHAR2 (4000);
    BEGIN
    -To loop through all the tables
    FOR tbl IN c_tbls LOOP
    l_sql: = "DECLARE" | «C_tbl_recs CURSOR IS» | ' SELECT * ' |. '
    'FROM ' | tbl.schema_name | '.' || tbl.table_name | '; ' ||
    ' t_tbl_rowtype c_tbl_recs % ROWTYPE; ' || "START" |
    "FOR rec IN c_tbl_recs LOOP |
    ' FOR col IN (SELECT column_name ' |)
    "FROM dba_tab_cols" |
    "Owner WHERE ="' | " tbl.schema_name | '''' ||
    ' AND table_name = "' | tbl.table_name | '''' ||
    ORDER BY column_id) LOOP '.
    *' dbms_output.put(col.column_name ||) '',''); ' || * "END OF LOOP; dbms_output.put_line('''); END LOOP; ' ||
    ' END; ';
    -dbms_output.put_line (l_sql);
    EXECUTE IMMEDIATE l_sql;
    END LOOP;
    EXCEPTION
    WHILE OTHERS THEN
    dbms_output.put_line (SQLERRM);
    END;
    END;

    Is this what you are looking for?
    (it took a few minutes)

    create or replace
    package some_proc is
    procedure create_files;
    end;
    /
    
    CREATE OR REPLACE
    PACKAGE BODY some_proc
    IS
      -- Function and procedure implementations
    PROCEDURE create_files
    IS
      CURSOR c_tbls
      IS
        SELECT * FROM tbl_list;
    
      CURSOR c_cols (p_table_owner VARCHAR2, p_table_name VARCHAR2)
      IS
        SELECT column_name
        FROM all_tab_columns
        WHERE owner   =p_table_owner
        AND table_name=p_table_name
        ORDER BY all_tab_columns.column_id;
    
      l_sql     VARCHAR2(32000);
    
      separator VARCHAR2(1):=';';
    
    BEGIN
      --Loop through all tables
      FOR tbl IN c_tbls
      LOOP
        dbms_output.put_line('TABLE: '||tbl.schema_name||'.'||tbl.table_name);
        l_sql := 'DECLARE ' ;
        l_sql := l_sql|| '  CURSOR c_tbl_recs IS ' ;
        l_sql := l_sql||'    SELECT * FROM ' || tbl.schema_name || '.' || tbl.table_name || '; ' ;
        l_sql := l_sql||'    linenr number:=1; ';
        l_sql := l_sql||'BEGIN ' ;
        l_sql := l_sql|| ' FOR rec IN c_tbl_recs LOOP ';
        FOR c IN c_cols(tbl.schema_name,tbl.table_name)
        LOOP
          l_sql:=l_sql ||' if linenr=1 then  dbms_output.put('''||c.column_name||''||separator||'''); end if; ' ;
        END LOOP;
        l_sql :=l_sql||'  dbms_output.put_line(''''); linenr:=linenr+1; ';
        FOR c IN c_cols(tbl.schema_name,tbl.table_name)
        LOOP
          l_sql:=l_sql ||' dbms_output.put(rec.'||c.column_name||'||'''||separator||'''); ' ;
        END LOOP;
        l_sql:=l_sql||'  end loop; ';
        l_sql:=l_sql||'  dbms_output.put_line(''''); ';
        l_sql:=l_sql||'  dbms_output.put_line(''''); ';
        l_sql:=l_sql||'end;';
        EXECUTE IMMEDIATE l_sql;
      END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
      dbms_output.put_line(SQLERRM);
    END;
    END;
    /
    
  • dynamic query, row to column

    Hello.
    There is a way to select a row as column for any table?
    I mean a script that have the name table and the status as input parameters and prints column_name | the value of the column;
    I tried to do, but having a few problems.
    for example to get table
    create table my_table (column1 number, column2 number, column3 number);
    insert into my_table values (1,2,3);
    It should be something like:
    declare
    lv_table_name varchar2(40):='MY_TABLE'; /*these are input paremeters*/
    lv_condition varchar2(300):='column1=1;/*these are input paremeters*/
    begin
    /*body*/
    end;
    and the output should be like (can use dbms_output)
    column1    1
    column2    2
    column3    3    
    Script should work for any table.
    Anyone solves similar to that task?

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:1035431863958

    Research of print_table of the procedure on this page.

Maybe you are looking for

  • A shield appeared on the Everio MediaBrowser HD Edition icon

    I noticed that a blue and yellow shield has now itself superimposed on my Everio MediaBrowser HD Edition icon in the taskbar.What is the reason for this?

  • STOP: 0X0000000A IRQL_NOT_LESS_OR_EQUAL

    When windows is shut down I get the error message IRQL_NOT_LESS_OR_EQUAL STOP: 0x0000000A(0x000002CC,0x000000FF,0x00000000,0 x804E3B58) It appears something is accessing memory while closing - this is the first time that I closed if unfortunately the

  • Automatic update does not complete. is required to create restore point. Windows 7

    At the stop, there is notification of updates to install. Windows stops without having to install updates. Tried to reinstall 7 but had "Windows has encountered an internal error initializing COM. Have tried all the usual solutions. Max

  • Z5c randomly ringtone...

    Since an update a few days ago my phone now randomly rings (well play the ring tone but there is no incoming call) I went through all the applications that I think looking for opinion/alerts, but nothing appears on the notification screen (the thing

  • Cannot decrypt previously encrypted files

    I had a record that I apparently encypted on my old pc, and I moved the drive containing this folder on my new pc as a 2nd hard drive. Now, all the file names are green and I can't access the file or if I can decrypt the files. When I try to move the