Insert a column instead of line in table 2d

Hello everyone. Without doubt, the answer is quite simple, but I can't seem to find out how to insert a table 1 d in a column instead of a line to a 2D one. I mean in the sense to keep the unwired to the function 'insert into array' behavior, adds the new item at the end of the table rather than replace an existing element, because it only accepts the default line and, if I wire column, it will not add new elements, but tent only to replace those that already exist, and if it finds a column empty write nothing. Any ideas?

Maybe I'm too evil understand the problem.

Tags: NI Software

Similar Questions

  • Column, instead of lines.

    Hello

    I want the results in column instead of lines.

    Now:

    Data1

    23,34,45,23,78,

    Data2

    35,89,32,45,

    It's not that I want .

    Data1

    23,

    34,

    45,

    23,

    78

    Data2

    35,

    89,

    32,

    45

    Or use a constant instead of end of line instead of a comma

  • View all in a single column, instead of lines (part 1)

    Hi all

    Help, please...
    How to make my lines of output SQL to display on a single column?
    I have a table: EMP & 3 columns: ID, ENAME, and BIRTHDAY.

    I inserted 3 rows in the table:
    ID ENAME BIRTHDAY
    1 Smith 11/09/1980
    2 Jones 01/01/1981
    3 Baker 02/02/1982

    I want the output of my query in Oracle Developer / ApEx to display like this:
    Employees
    ---------------

    Smith
    11/09/1980

    Jones
    01/01/1981

    Baker
    02/02/1982

    Best regards
    Sunenny

    Published by: user643233 on November 6, 2008 09:10

    Strange formatting. Maybe you could try something like this...

    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    
    SQL> CREATE OR REPLACE TYPE varchar2_table AS TABLE OF VARCHAR2 (4000);
      2  /
    
    Type created.
    
    SQL> SELECT column_value
      2  FROM   emps, TABLE (varchar2_table (NULL, ename, hiredate));
    
    COLUMN_VALUE
    --------------------------------------------------------------------------------
    
    SMITH
    17-DEC-80
    
    ALLEN
    20-FEB-81
    
    WARD
    22-FEB-81
    
    JONES
    02-APR-81
    
    MARTIN
    28-SEP-81
    
    BLAKE
    01-MAY-81
    
    CLARK
    09-JUN-81
    
    SCOTT
    19-APR-87
    
    KING
    17-NOV-81
    
    TURNER
    08-SEP-81
    
    ADAMS
    23-MAY-87
    
    JAMES
    03-DEC-81
    
    FORD
    03-DEC-81
    
    MILLER
    23-JAN-82
    
    42 rows selected.
    
    SQL>
    
  • Insert BULK column no table

    I found this good example online inserts bulk of a table to the other, but I want to only collect them a column in bulk and insert a column. How I would change the example below?

    CREATE OR REPLACE PROCEDURE fast_proc (p_array_size PLS_INTEGER IN by DEFAULT 100)
    IS

    ARRAY TYPE IS TABLE of object % ROWTYPE;
    l_data TABLE;

    CURSOR c IS
    SELECT *.
    Of object;

    BEGIN
    OPEN C;
    LOOP
    Fetch c COLLECT LOOSE l_data LIMIT p_array_size;

    FORALL i IN 1.l_data. COUNTY
    INSERT INTO l_data (i) t2 VALUES;

    EXIT WHEN c % NOTFOUND;
    END LOOP;
    C CLOSE;
    END fast_proc;
    /

    Hello

    Yes, this is the fastest method during the major party collect

    ANd if you use APPEND hint is direct path insert (moves data faster from one table to another )
    
    insert /*+ APPEND */ into t2 (col1) select owner from all_objects;
    commit;
    

    Concerning

  • How to select columns, that we need a table with pivot

    Hello

    How can I select only the required columns that I need the table

    My goal is to keep everything in one line

    Database: 11.2.0.2.0

    I have a table called Table Agent

    create the table AGENT_DETAIL

    (

    agent_id NUMBER (20) not null,

    agent_type_code VARCHAR2 (10) not null,

    agent_type_prefix VARCHAR2 (10) not null,

    Type_Code VARCHAR2 (10) not null,

    type_prefix VARCHAR2 (10) not null,

    last_modified DATE not null

    )

    INSERT INTO agent_detail VALUES

    (29709, ARE ',' OFFICE ',' DNSWEB ',' AGTDETAILS', SYSDATE);

    INSERT INTO AGENT_DETAIL VALUES

    (29709, ARE ',' OFFICE ',' DNSNATID ',' AGTDETAILS', SYSDATE);

    INSERT INTO AGENT_DETAIL VALUES

    (29709, ARE ',' OFFICE ',' DELIVERY ',' AGTDETAILS', SYSDATE);

    INSERT INTO AGENT_DETAIL VALUES

    (29709, ARE ', 'OFFICE', "WEBUSAGE", "WEBUSER" SYSDATE);

    When you query it against the table

    SELECT * FROM AGENT_DETAIL;

    AGENT_IDAGENT_TYPE_CODEAGENT_TYPE_PREFIXTYPE_CODETYPE_PREFIXLAST_MODIFIED
    129709REOFFICEDNSWEBAGTDETAILS22:14:15 12/09/2015
    229709REOFFICEDNSNATIDAGTDETAILS09/12/2015-22:15:26
    329709REOFFICEDELIVERYAGTDETAILS09/12/2015-22:21:37
    429709REOFFICEWEBUSAGEWEBUSER10/12/2015-09:27:52

    Because my goal is to put everything in a single line instead of get in 4 rows

    My query is like that

    (select *)

    the Dungeon of pivot (min (TYPE_CODE) AGENT_DETAIL (last dense_rank command by LAST_MODIFIED) for TYPE_CODE in ('DNSWEB' as the WEB)

    'DNSNATID' as

    NATIONAL,

    'DELIVERY' AS

    DELIVERY,

    "WEBUSAGE" AS WEBUSAGE

    )

    ))

    Result:

    AGENT_IDAGENT_TYPE_CODEAGENT_TYPE_PREFIXTYPE_PREFIXWEBNATIONALDELIVERYWEBUSAGE
    129709REOFFICEWEBUSERWEBUSAGE
    229709REOFFICEAGTDETAILSDNSWEBDNSNATIDDELIVERY

    Is it possible to get everything in one record, I know that I have two type_prefixes different (WEBUSER, AGTDETAILS)

    But all I want to see my data is like this

    Agent_id Agent_type_code Agent_type_prefix WEB WEBUSAGE NATIONAL DELIVERY

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

    RE OFFICE DNSWEB DNSATID DELIVERY WEBUSAGE 29709

    Hello

    When you use SELECT... PIVOT, the result set contains 1 row for all the distinct combinations of the values of all columns except columns mentioned in the PIVOT clause.  If you want to ignore some columns completely, then let the PIVOT operated at a "table" that does not include the.  For example:

    with RELEVANT_AGENT_DETAIL as

    (

    Select AGENT_ID, AGENT_TYPE_CODE, AGENT_TYPE_PREFIX, TYPE_CODE, LAST_MODIFIED

    of AGENT_DETAIL

    -where--if you filter, put it here

    )

    Select *.

    of RELEVANT_AGENT_DETAIL

    Pivot (min (TYPE_CODE) Dungeon (last dense_rank command by LAST_MODIFIED))

    for TYPE_CODE in ('DNSWEB' as WEB

    'DNSNATID' as NATIONAL

    'DELIVERY' as DELIVERY

    "WEBUSAGE" as WEBUSAGE

    )

    )

    ;

    If you are lazy or trying to be cute, maybe you can give the columns unwanted some lazy jobs in the PIVOT clause, like this:

    Select *.

    of AGENT_DETAIL

    Pivot (min (TYPE_CODE) Dungeon (dense_rank last order by LAST_MODIFIED)

    TYPE_CODE

    TYPE_PREFIX

    )

    for TYPE_CODE in ('DNSWEB' as WEB

    'DNSNATID' as NATIONAL

    'DELIVERY' as DELIVERY

    "WEBUSAGE" as WEBUSAGE

    )

    )

    ;

    But this makes the code confusing and may be difficult to maintain.

  • Excel & ActiveX: Insert arbitrary columns of 2D array and create problems of graph

    Hello

    I want to insert data in a 2D of LabView or 1 d table in Excel and create graphics.

    I used the information in the following example:

    http://www.NI.com/example/28934/en/

    and has managed to create a new Excel file (I use Excel 2010) writes data in a 1 d table to a column in excellent by creating a while loop and using the first element of the array to write in a specific cell. I use the loop counter to write to the next cell when the loop starts again and always remove the first value, I write to the cell of the table until it is empty.

    Now I also want to write a 2D - column in Excel table should be the first column of the matrix and so. Here, I can not use the loop counter directly as Excel there are only 1,2,... for the lines, but uses A, B,... to count columns. Also I do not know in advance the number of columns my 2D array will contain, thus creating a lookup table as (A means 1, 2 B, which means...) is not really an option (except there is really no other way). Is there a possibility to convert numbers into letters or somehow to "explain" to the program that this column 2 of the table means column B in Excel for example, or is it possible to insert new columns?

    I figured out how to add new calculation sheets and as I also need to create a certain number of spreadsheets and I know that the standards 3 sheets are present during the creation of the file, I use the method 'Add' to create new worksheets before the worksheet 3 - I could use the same method to create new columns in Excel , but so far I have not found a method to do. Or is there a way to enter into the 2D table all at once?

    So I want to create a chart (in case 1 d tables draw a bar when using 2D arrays a 3D field) to display the data. I found this example:

    http://www.NI.com/newsletter/51339/en/

    -> that I do not have the tool box I would do it directly using ActiveX, so I tried to make things as shown under the title "ActiveX DIY /.» NET'

    I tried to load the code snippet into a new Excel file but got the error message "microsoft.office.interop.excel.dll" not found and this is why the code does not work. Which confuses me a bit as I guess when this dll is not present I can not access Excel of LabView at all, although my understanding of what I'm doing so far is limited in the calm. ;-)

    Also - as far as I understand the extract - when you create a new graphic object, I should be able methods to create for her, however when I do a right click on the graphic object to a symbol of the spreadsheet ActiveX it no listed.

    To explain my problems better, I added an excerpt showing my two problems: the inside of the two loops while showing how to import a table 1 d. In the outer loop I separate the columns. I know that is not currently as has all the data in the column of the Excel sheet - so I need to convert the external meter number a, B,... or find another solution.

    In addition, on extract, I placed a property ActiveX spreadsheet with the Chart object - I can see that the difference to the graphics object of the example code of the last link above is the color. However I do not know what it means and how to change / fix this.

    And just to make sure - I know that this path that the VI is not running as the graphical object is placed completely false – I just did, so it is included in the extract.

    I would be grateful for any suggestion,

    Thank you!

    Hi all

    for your information in professional 2014 LabVIEW report generation toolkit is included

    Table 2D

    I want to write table 2D in specific columns/rows in excel

    Graph

    Create a graph through ActiveX Labview traced XY scatter on an excel sheet

    also good information about Excel and ActiveX

    Excel Council

    Hope that if aid, if not please let me know.

  • Order of columns in a line

    Hello

    I'm fighting to solve a problem. I want to sort the values of the fields in each line.

    RDBMS: 11.2.0.3
    CREATE TABLE test_order
      (a NUMBER, b NUMBER ,c NUMBER ,d NUMBER
      );
    
    REM INSERTING into test_order
    Insert into "test_order" (A,B,C,D) values ('18','29','14','21');
    Insert into "test_order" (A,B,C,D) values ('40','11','29','12');
    Insert into "test_order" (A,B,C,D) values ('22','20','19','24');
    
    select * from test_order
    
             A          B          C          D
    ---------- ---------- ---------- ----------
            18         29         14         21 
            40         11         29         12 
            22         20         19         24 
    I'm trying to get the result in the order as listed below IS NOT question of name of column.

    Each line ordered by its own columns.
             A          B          C          D
    ---------- ---------- ---------- ----------
            14         18         21         29 
            11         12         29         40 
            19         20         22         24 
    Note: my real table have more than 1 million records.

    Any help is welcome.

    Seeing as Frank is also fun with this, and I get bored, I look at a data pump import ticking on the partition in the partition, I thought to create a called TSortedNumbers - SQL data type that allows you to create/store a set of numbers in a sorted list and providing a method to return a specific element in the game.

    As the PL/SQL code should be used to replace the default constructor, I decided to use a PL/SQL quicksort on the list of numbers - that oppose a context switching expensive in SQL for SQL did sort it out for you. No idea what (if any) of the performance improvements it use a quicksort PL/SQL.

    However, it shows the really kewl and awesome features Oracle provides in allowing to define custom types SQL.

    // TNumbers is an array/collection of numbers
    SQL> create or replace type TNumbers as table of number;
      2  /
    
    Type created.
    
    // package Lib, implements the well-known Quick Sort algorithm - and sorts an
    // array of numbers, where the array is of data type TNumbers
    SQL> create or replace package Lib is
      2          procedure QuickSort( array in out nocopy TNumbers );
      3  end;
      4  /
    
    Package created.
    
    SQL>
    SQL> create or replace package body Lib is
      2          procedure SwapPivots( array in out nocopy TNumbers, pivot1 number, pivot2 number ) is
      3                  pivotValue      number;
      4          begin
      5                  pivotValue := array(pivot1);
      6                  array(pivot1) := array(pivot2);
      7                  array(pivot2) := pivotValue;
      8          end;
      9
     10          procedure  Partition( array in out nocopy TNumbers, left number, right number, pivotIndex number, storeIndex out number ) is
     11                  pivotValue      number;
     12          begin
     13                  pivotValue := array(pivotIndex);
     14                  SwapPivots( array, pivotIndex, right );
     15                  storeIndex := left;
     16                  for i in left..right - 1 loop
     17                          if array(i) < pivotValue then
     18                                  SwapPivots( array, i, storeIndex );
     19                                  storeIndex := storeIndex + 1;
     20                          end if;
     21                  end loop;
     22                  SwapPivots( array, storeIndex, right );
     23          end;
     24
     25          procedure QuickSort( array in out nocopy TNumbers, left number, right number ) is
     26                  pivotIndex      number;
     27                  pivotNewIndex   number;
     28          begin
     29                  if left < right then
     30                          pivotIndex := trunc( DBMS_RANDOM.value( left, right ) );
     31
     32                          Partition( array, left, right, pivotIndex, pivotNewIndex );
     33                          QuickSort( array, left, pivotNewIndex-1 );
     34                          QuickSort( array, pivotNewIndex+1, right );
     35                  end if;
     36          end;
     37
     38          procedure QuickSort( array in out nocopy TNumbers ) is
     39          begin
     40                   QuickSort( array, 1, array.Count );
     41          end;
     42
     43  end;
     44  /
    
    Package body created.
    
    // We define a a custom SQL data type that contains a single property called n,
    // where n is of type TNumber.
    // The default constructor for this type is: TSortedNumbers (  create or replace type TSortedNumbers is object(
      2          n       TNumbers,
      3
      4          constructor function TSortedNumbers(n TNumbers) return self as result,
      5          member function Get(i integer) return number
      6  );
      7  /
    
    Type created.
    
    // Using our custom constructor, we accept the array-of-numbers parameter,
    // assign it to our  TSortedNumbers property n, and quick sort our property so
    // that the array-of-numbers is in ascending values.
    // We also provide a method called Get(), that allows the caller to get a value
    // from our sorted array, by index number.
    SQL> create or replace type body TSortedNumbers as
      2          constructor function TSortedNumbers(n TNumbers) return self as result is
      3          begin
      4                  self.n := n;
      5                  Lib.QuickSort(self.n);
      6                  return;
      7          end;
      8
      9          member function Get(i integer) return number is
     10          begin
     11                  return( self.n(i) );
     12          end;
     13
     14  end;
     15  /
    
    Type body created.
    
    // Create sample table and populate it with data
    SQL> create table testtab( a number, b number, c number, d number );
    
    Table created.
    
    SQL>
    SQL> insert into testtab (A,B,C,D) values ('18','29','14','21');
    
    1 row created.
    
    SQL> insert into testtab (A,B,C,D) values ('40','11','29','12');
    
    1 row created.
    
    SQL> insert into testtab (A,B,C,D) values ('22','20','19','24');
    
    1 row created.
    
    // To create an array of numbers, we use the TNumbers() data type. Its
    // constructor  is TNumbers( num1, num2, .., numn ). We pass the columns of
    // the rows as parameters into this constructor and it creates an array of our
    // column values. As we now have an array-of-numbers, we can instantiate a
    // TSortedNumbers object. Its constructor required an array-of-numbers
    // parameter. Which is what we have created using our row's columns.
    // As the TSortedNumbers object contains a sorted array-of-numbers of our
    // columns, we can display the numbers in the array using the Get() method
    // and index position in the array of the number we want to display.
    SQL> with results as(
      2  select
      3          rownum,
      4          t.*,
      5          TSortedNumbers( TNumbers(a,b,c,d) ) as NUMBER_SET
      6  from       testtab t
      7  )
      8  select
      9          r.number_set.Get(1)     as "1",
     10          r.number_set.Get(2)     as "2",
     11          r.number_set.Get(3)     as "3",
     12          r.number_set.Get(4)     as "4"
     13  from       results r
     14  /
    
             1          2          3          4
    ---------- ---------- ---------- ----------
            14         18         21         29
            11         12         29         40
            19         20         22         24
    
    SQL>
    

    Published by: Billy Verreynne on April 13, 2013 18:04 (comments added for example)

  • Conversion of column to the lines

    Hello
    I'm currently building and SQL to convert columns from several lines to all lines - see below the test data and the expected result:
    CREATE TABLE XX_TEST (NAME VARCHAR2 (10), A1 VARCHAR2 (10), A2 VARCHAR2 (10), A3 VARCHAR2 (10), A4 VARCHAR2 (10), A5 VARCHAR2 (10));
    INSERT INTO XX_TEST VALUES('LIST','A','B','C','D','E');
    INSERT INTO XX_TEST VALUES('L1','1',,'3',,);
    INSERT INTO XX_TEST VALUES('L2','1','5','4',,);
    ENGAGE
    SELECT * FROM XX_TEST;

    Expected result:
    NAME is the table XX_TEST column, but the COLUMN and the VALUE are converted to lines - columns

    NAME THE COLUMN VALUE
    L1 A1 1
    L1 A2 NULL
    L1 A3 3
    L1 A4 NULL
    L1 A5 NULL
    L2 A1 1
    L2 A2 5
    L2 A3 4
    L2 NULL A4
    L2 A5 NULL

    Thank you
    BS

    Hello

    user13409900 wrote:
    Thank you Alex and Frank,

    Don't foget Aketi!

    The two ways are really good and functional in my situation.
    I apologize for not giving version: I'm on 11g so I think that can use Unpivot. It would be really more faster (performance given the volume of data) to use unpivot characteristic of 11 g?

    If there is no significant difference, whereas I think is that SELECT... UNPIVOT would be faster. It is purely a guess. It depends on several factors, including your data, your index and your machine. I don't have access to one of them.

    Try both ways and compare performance. (Compare the results, too, to check that the two qiueries are really doing the same thing).
    If you need help, see this thread:
    HOW to: Validate a query of SQL statement tuning - model showing

    I've never used before unpivot.

    This sounds like a good opportunity to learn.

  • How to insert an XML document to the database table

    Here's one my XML document example I want to import into database

    Example XML Document
    <? XML version = "1.0"? >
    rowset <>
    < ROW >
    < DEPTXML department_id = "10" >
    SALES of < DEPARTMENT_NAME > < / DEPARTMENT_NAME >
    < EMPLIST >
    < EMP_T EMPLOYEE_ID = "30" >
    Scott < LAST_NAME > < / LAST_NAME >
    < / EMP_T >
    < EMP_T EMPLOYEE_ID = "31" >
    Marie < LAST_NAME > < / LAST_NAME >
    < / EMP_T >
    < / EMPLIST >
    < / DEPTXML >
    < / ROW >
    < ROW >
    < DEPTXML department_id = "20" >
    < DEPARTMENT_NAME > ACCOUNTING < / DEPARTMENT_NAME >
    < EMPLIST >
    < EMP_T EMPLOYEE_ID = "40" >
    John < LAST_NAME > < / LAST_NAME >
    < / EMP_T >
    < EMP_T EMPLOYEE_ID = "41" >
    Jerry < LAST_NAME > < / LAST_NAME >
    < / EMP_T >
    < / EMPLIST >
    < / DEPTXML >
    < / ROW >
    < / LINES >
    ********End***********

    Table in which I want to import this file

    hr_new_emp
    (
    department_id number,
    department_name varchar2 (50).
    Number of employe_id
    last_name varchar2 (50)
    )

    If your XML code is in a file, the easiest is to load as a CLOB in the file (google search will give you lots of results to load a file into a CLOB, so I won't detail it here). Once you have it as a CLOB you can fairly easily convert that XMLTYPE for example

      v_xml := XMLTYPE(v_clob);
    

    (assuming that v_xml is declared as XMLTYPE and v_clob is declared as a CLOB)

    Once you have it as an XMLTYPE that is simple to use XMLTABLE to break the XML into its components using SQL...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select xmltype('
      2  
      3  
      4  
      5  SALES
      6  
      7  
      8  Scott
      9  
     10  
     11  Mary
     12  
     13  
     14  
     15  
     16  
     17  
     18  ACCOUNTING
     19  
     20  
     21  John
     22  
     23  
     24  Jerry
     25  
     26  
     27  
     28  
     29  ') as xml from dual)
     30  --
     31  -- END OF TEST DATA
     32  --
     33  select x.department_id, x.department_name, y.employee_id, y.last_name
     34  from t
     35      ,xmltable('/ROWSET/ROW'
     36                passing t.xml
     37                columns department_id   number       path '/ROW/DEPTXML/@DEPARTMENT_ID'
     38                       ,department_name varchar2(30) path '/ROW/DEPTXML/DEPARTMENT_NAME'
     39                       ,emplist         xmltype      path '/ROW/DEPTXML/EMPLIST'
     40               ) x
     41      ,xmltable('/EMPLIST/EMP_T'
     42                passing x.emplist
     43                columns employee_id     number       path '/EMP_T/@EMPLOYEE_ID'
     44                       ,last_name       varchar2(30) path '/EMP_T/LAST_NAME'
     45*              ) y
    SQL> /
    
    DEPARTMENT_ID DEPARTMENT_NAME                EMPLOYEE_ID LAST_NAME
    ------------- ------------------------------ ----------- ------------------------------
               10 SALES                                   30 Scott
               10 SALES                                   31 Mary
               20 ACCOUNTING                              40 John
               20 ACCOUNTING                              41 Jerry
    

    ... and once you have selected the data as it is quite easy to use an INSERT statement around it to insert data into a table, as in a regular INSERT... Select...

    If you are dealing with large amounts of data or a more complex XML structure, you can consider using an XML schema to shred the data in tables.

    Example here...

    Re: XML processing in oracle file

    And you can also load XML data easily by using the function XDB (WebDAV) to Oracle. Details in the Oracle documentation for that or you could find help in the forum XML DB, which also has a FAQ detailing the different methods how to load XML shred data...

    DB XML FAQ

  • Reg: try to insert * dbms_output. PUT_line ('hi') * in the table.

    Hi all
    Try inserting dbms_output. PUT_line ('hi') in the table.

    DOF of the table is:
    create table test_result (tab varchar2 (30), varchar2 (2000)) of the State;


    The code is:

    DECLARE
    A1 VARCHAR2 (1000);
    BEGIN
    A1: = dbms_output. PUT_line ('hi');
    INSERT INTO test_result VALUES ('PRASAD', dbms_output. PUT_line ('hi'));
    END;

    Get the error message like:
    Error from the 1 in the command line:
    DECLARE
    A1 VARCHAR2 (1000);
    BEGIN
    A1: = dbms_output. PUT_line ('hi');
    INSERT INTO test_result VALUES ('PRASAD', dbms_output. PUT_line ('hi'));
    END;
    Error report:
    ORA-06550: line 4, column 8:
    PLS-00222: no function with name 'PUT_LINE' does exist in this scope
    ORA-06550: line 4, column 2:
    PL/SQL: Statement ignored
    ORA-06550: line 5, column 53:
    PL/SQL: ORA-00904: invalid identifier
    ORA-06550: line 5, column 1:
    PL/SQL: SQL statement ignored
    06550 00000 - "line %s, column % s:\n%s".
    * Cause: Usually a PL/SQL compilation error.
    * Action:


    Thanks in advance.

    If you try to capture the data of the output as DBMS_OUTPUT buffer. Put_line written to, then you must use the procedure GET_LINE in the same package.

    for example

    SQL> ed
    Wrote file afiedt.buf
    
      1  DECLARE
      2    A1 VARCHAR2(1000);
      3    status number;
      4  BEGIN
      5    dbms_output.enable;
      6    dbms_output.PUT_line('hi') ;
      7    dbms_output.get_line(a1, status);
      8    INSERT INTO test_result VALUES('PRASAD',a1);
      9* END;
    SQL> /
    
    PL/SQL procedure successfully completed.
    
    SQL> select * from test_result;
    
    X          Y
    ---------- ----------
    PRASAD     hi
    
    SQL>
    
  • How to get the values of the modified line of table of the ADF?

    JDev 11.

    I have a table that is filled with bean data.
    I need to save changes after the user makes changes in any table cell. InputText is defined for the table column component.
    I've defined ValueChangeListener for inputText field and AutoSubmit = true. So when the user change the value field inputText, the method is called:

    public void SaveMaterial (ValueChangeEvent valueChangeEvent) {}
    getSelectedRow();
    SaveMaterial (material);
    }

    This method must call getSelectedRow that take values of the selected table row and save them in object:

    private line {} getSelectedRow()

    Table richeTableau = this.getMaterialTable ();
    Selection of the iterator = table.getSelectedRowKeys () .iterator ();
    While (selection.hasNext ())
    {
    Key of the object = next ();
    table.setRowKey (key);
    Object o = table.getRowData ();
    material = o (HARDWARE);
    }
    System.out.println ("selected hardware Desc =" + material.getEnumb ());
    Returns a null value.
    }

    Problem is that getSelectedRow method is not new (edited) values, old values are still used.

    I tried to use ActiveButton with the same method and it works very well in this case. New values are inserted and active line in the object selected.

    JSF:

    < af:table var = 'row' rowSelection = "single" columnSelection = "unique."
    value = "#{ManageWO.Material}" binding = "#{ManageWO.materialTable}" > "

    < af:column sortable = "false" headerText = "E-number" >
    "< af:inputText value =" #{row.enumb} "valueChangeListener =" #{ManageWO.SaveMaterial} "autoSubmit ="true"/ >
    < / af:column >

    < af:column sortable = "false" headerText = "Description" >
    "< af:inputText value =" #{row.desc} "valueChangeListener =" #{ManageWO.SaveMaterial} "autoSubmit ="true"/ >
    < / af:column >
    ......
    < / af:table >

    < af:activeCommandToolbarButton text = "Save" action = "#{ManageWO.EditData}" / >


    What is a good place where Save method must be called to get the new values (edited) table of the ADF?

    Thank you.

    Have you looked into the valueChangeEvent?

    There oldValue and newValue attributes.

    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    Object oldVal = valueChangeEvent.getOldValue();
    Object newVal = valueChangeEvent.getNewValue();
    // check if you see what you are looking for.....
    getSelectedRow();
    SaveMaterial(material);
    }
    

    Timo

  • Arrange the tiles in a column, but multiple lines

    When you have the tiles on The start screen of Metro , you can set the group / block a tile only, but when you want to add the second tile to this group / block, you can put only horizontally (from left or right tile existed), in other words, you can add the column within that group, but you can put the new Tile vertically , under a tile already existence.

    I want to define group / block of tiles with a single column, but multiple lines.
    For example, instead of this:
    xx xx xx    xx
    xx          xx    xx
    to get this:
    xx x xx    xx
    xx x xx    xx
    Screenshot:

    Hi Mike b. II.

    It's normal. You cannot have tiles in groups vertically. Now in your case, if you change the tiles to large tiles, they will stack vertically.

  • How can I insert several CSVs in dreamweaver in a table based on ID

    How can I insert several CSVs in dreamweaver in a table based on ID? I recorded each sheet in the doc excel as a CSV file and now I want to import all the CSVs in one table by pulling the information attached to the ID of the line.

  • Selection of parts and columns, or entire lines and apply the character style

    I am trying to apply character styles to certain parts/whole rows and columns.

    I can change individual cells with the following code...

    table = app.selection[0];
    if (table.hasOwnProperty("baseline")) table = table.parent;
    if (table instanceof Cell) table = table.parent;
    if (table instanceof Column) table = table.parent;
    if (table instanceof Row) table = table.parent;
    if (table instanceof Table)
    
    {
     table.rows[0].cells[6].texts[0].appliedCharacterStyle = "none report";
     }
    

    ... but when I try to select an entire line, I get the error 'Object does not support property or method' texts. "" "When I try one of the following two codes.

    {
     table.rows[0].cells.texts.appliedCharacterStyle = "none report";
     }
    

    {
     table.rows[0].cells.appliedCharacterStyle = "none report";
     }
    

    Anyone know how I can do the following?

    1. Select any row (or column) and apply the character style

    2. Select the last line (regardless of the number of rows in the table) and apply the character style

    3. apply the character style to specific columns (with theexception of the cells of two albums)

    Thank you!

    Hello

    Change this line:

    table.columns[a].cells.itemByRange(2,-1).texts.everyItem().appliedCharacterStyle = "chart orange";
    

    for the first 2 rows in each column

    Jarek

  • selection of lines AF:table after sorting

    Hello

    If I select a line to an af:table and then to sort a column, the first line in the sorted table is selected.
    Is there a way to keep the selection while sorting?

    jdev versions:
    -11.1.1.4.
    -11.1.2.0.

    Edited by: Fortega January 25, 2012 0:47

    Please mention your version jdev 11g being ambiguous...

    A sorting table normally means that the query is executed again with the selected sorting criteria. It also means that the current line that you checked before disappeared and the first line is marked as the current line.
    You can save the key to the current line before the sort and place after sorting (using a managed bean).
    However, you should be aware of the impact:
    lets assume your table has 1000 rows and is sorted by Crescent after the default name column. Now select you the first line and click Descending in the same column. In this case the selected line will now be the last line. This line is not visible, then you need to scroll in the view with the effect that all the lines are read into memory. If you have 100000 lines that get worse (more memory and more time).

    Timo

Maybe you are looking for

  • "Sit less, move more.

    The new IOS 10.0.2 has modified the application of health by adding a video called "sit less, move more" section of health data. Although I agree with the feeling and I'm even happy to be preached about this TIME, he began to grate. Can I remove or i

  • Screenshot with iOS 10

    Someone else just take a screenshot with iOS 10?

  • Bluetooth problem after updating windows 8.1

    I installed windows 8.1 then my bluetooth get troubled. I have search the forum, but I don't know really where (driver) is compatible for my PC. I use HP Pavilion 14-n003tx Notebook PC. can someone help me find the compatible bluetooth driver?

  • Change key wireless connection security

    I want to change the security key for an easier to remember the connection to my wifi. Can someone help me.

  • BlackBerry Z10 transfer data/files/contacts

    Hello So I have a little problem. I just traded my 9900 to a Z10 to the store where I got them. I saved the 9900 this afternoon before I took it, but I didn't know that the Office Manager was not compatible with the new OS. Now my problem is that I c