How to load data from different tables, but record to another table?

Hi all

I use the apex and I understand how it updates and saves the files normally.

In this case, I would need to load from a table, but save on another Board on the button "submit".

I am aware that it would be easy as forms where I could do a manual insert process. im making in tabular form and I don't really know how to handle this process.

Suppose that I am loading a set of questionnaires in the form of tables and have a yes / no selection.

If the questions would come from table A and I need to save it in table B.

in this case that I can't put just the value default by the tabular row for questions coz it would be dynamic and this example is on a small scale. I would need to load the table A and record in table B.

could someone guide me on this operation or provide tutorials any?

Maybe that's what you're after.

(1) create region report using SQL like this:

Select apex_item.hidden(1,rownum).

apex_item.display_and_save(2,question_column) in Question,

apex_item. Text(3,,4,4) as answer

from table_a

apex_item documentation of package found:

http://docs.Oracle.com/CD/E37097_01/doc/doc.42/e35127/apex_item.htm

The pidx (first number) in each apex_item parameter is used to identify this item in the same row of the report' / tabular form.

(2) create a submit in procedure a bit like that.

Start

because I 1.apex_application.g_f01.count loop - identifies the "apex_item.hidden(1,rownum)" at the top and gets a count of how many times it occurs

Insert into table_b (question, answer)

values (apex_application.g_f02 (i), apex_application.g_f03 (i));

end loop;

end;

Tags: Database

Similar Questions

  • How to load data from Oracle tables into essbase?


    Hello

    I'm fairly new to essbase. We are working on essbase 11.1.2.2.

    I want to build size & load data using pre-existing data warehouse which is built on Oracle.

    I try to use "Open SQL". I use OIC.  It is gicing me connection error (1021001).

    The following log shows:

    [Sea 14 Aug 14:15:06 2013] Local/SA_EB_1/MIS_FIN/SA0053580@Native Directory/10868/Info (1021097)
    EssOCI Initializes the connection to the Oracle database on the server [tmdwtst1]

    [Sea 14 Aug 14:15:25 2013] Local/SA_EB_1/MIS_FIN/SA0053580@Native Directory/10868/Info (1021099)
    EssOCI could not connect to the Oracle database with error message [ORA-12154: TNS: could not resolve the connect identifier specified]
    ]

    [Sea 14 Aug 14:15:25 2013] Local/SA_EB_1/MIS_FIN/SA0053580@Native Directory/10868/Error (1021001)
    Cannot establish a connection to the SQL database server.  See the log for more information

    [Sea 14 Aug 14:15:25 2013] Local/SA_EB_1/MIS_FIN/SA0053580@Native Directory/10868/Warning (1080014)
    Transaction [0 x 2650001 (0x520b4392.0x69b68)] abandoned due to the State [1021001].

    Help, please.

    Thank you

    Sam

    You use the correct format for the OIC:

    Host: port / Oracle_service_name

    See you soon

    John

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

  • How to load data from ms sql to the by the file rules and maxl essbase

    Hi, everybody!
    Pretty Shure the kind of topic exists already on the forum, but unfortunately can't find it.

    I want to understand, how to load data from the database to ms sql for the PB of essbase application.

    (I) so I have:
    1. a request for 'society '.
    2 and its database 'Plan '.
    3. with simple outline, which contains only two dimensions:

    -The time period < 1 > (Label only)
    -Total year (~)
    -Qtr1 (+)
    Jan (+)
    Feb (+)
    Mar (+)
    -Qtr2 (+)
    APR (+)
    May (+)
    Jun (+)

    -Accounts < 1 > (Label only)
    -Lost / based (~) (Label only)
    -Revenues (+)
    L1.1 (+)
    L1.2 (+)
    -Costs (-)
    L2.1 (+)
    L2.2 (+)

    (II) also, I created a rules file called "CO_DWH" and associated with this schema
    It (Rules file) a 3 columns:
    Data of the 'period', 'account '.

    There is also the option checked "load data".

    (III) in MS SQL Server, I have a database of "hypdb" and "essadmin" with "password" login

    (IV) I executed my bat file:
    C:\Hyperion\EssLoad.bat
    There is only one line:

    EssLoad.bat-
    startMaxl.cmd EssLoad.txt
    ----------------------------------------------

    EssLoad.txt-
    login password admin on erpserver;
    Import database data Company.Plan connect in essadmin password using the server rules_file 'CO_DWH' error abort;
    disconnection;
    "exit";
    --------------------------------------------


    All plans that I copied well worked ERP system, but I don't understand, this is exactly table in the MS SQL database, data loading to essbase db?

    TOU have to do a few things
    1. on the server of Essbase, put in place a system odbc for your MySQL database connection
    2. in the State of charge, go to the file menu and select open source SQL database and in the source of data in your SQL statement. A few tips. Where it says select, don't put in the select Word and when he says to not put in of. The system adds for you. TI enter a simple SQL statement is to do this in the box so select if your SQL would be normanlly as select * from myTable just enter the code as * from myTable in the upscale neighborhood

    The ol/recover the click and fill your connection information. Should bring back the data in the State of charge. Save the State of charge and use

  • How to load data from workflow

    How to load data from workflow (POAPPRV.wft, QAPPRV.wft)

    11i apps

    Hello

    Use WFLOAD to load the workflow data I.

    WFLOAD apps / 0 Y FORCE xxxx.wft
    WFLOAD apps / 0 Y FORCE xxxx.wft

  • How dynamically load data in target tables using as source files

    Hello

    My script needs a single interface to load data from 5 different files in five paintings of target using a single interface. All target tables have the same structure. It is possible to point to files variable source using ODI. But the same approach does not work with database tables. I get errors trying to make my table as dynamic target/source.

    Can anyone suggest anything. The last option would write a dynamic PL/SQL block in the KM. Other friends of suggestions?

    Kind regards
    Jay

    and not exists)
    Select 'X '.
    h. #PLAYGROUND. "v_tab_name"T ".

    have you provided the name of the resource with the quotes, if so please remove it and try.

    If you have provided the name of the variable, a v_tab_name and do not provide quotes. Can you please change the name of the variable to the capital, namely V_TAB_NAME and use the same in the data store too and please try again.

  • How to export data from the table with the colouring of cells according to value.

    Hi all

    I use jdeveloper 11.1.1.6

    I want to export data from the table with a lot of formatting. as for color cells based on value and so much. How to do this?

    You can find us apache POI-http://poi.apache.org/

    See this http://www.techartifact.com/blogs/2013/08/generate-excel-file-in-oracle-adf-using-apache-poi.html

  • How to load data from matrix report in the base using ODI table data

    Hello

    How to load matrix report data in the base table data using oracle Data Integrator?

    Description of the requirement:

    This is the data from matrix report:
    JOB                       DEPT10                DEPT20  
    ___________________________ _____________
    ANALYST                                           6000
    CLERK                   1300                     1900 
    Need to convert it to the format below:
    JOB                             Dept                        Salary
    _____________________________________________
    ANALYST                  DEPT10      
    ANALYST                  DEPT20                     6000
    CLERK                       DEPT10                    1300
    CLERK                       DEPT20                    1900
        
    Thank you for your help in advance. Let me know if any other explanation is needed.

    Your list seems to be a bit restrictive, you can do much more with the procedures of ODI.

    If you create the new procedure and add a step. In the 'source' tab command you define technology and pattern according to your source database. Use the unpivot operator as described in the link, please, instead of using "SELECT *' use the column names and aliases for example:"

    SELECT workstation,
    deptsal as deptsal,
    saldesc as saledesc
    OF pivoted_data
    UNPIVOT)
    deptsal-<-->
    FOR saldesc-<-->
    IN (d10_sal, d20_sal, d30_sal, d40_sal).<-->
    )

    Then in your tab 'command on target' defined technology and drawing on your target db, then put your INSERT statement for example:

    INSERT INTO job_sales
    (employment,
    deptsal,
    saledesc
    )
    VALUES
    (
    : job,.
    : deptsal,.
    : saledesc
    )

    That's why you use bind variables from source to load data into the target.

    Obviously if the source and target table is in the same database, you can have it all in a single statement to the "command on target' as

    INSERT INTO job_sales
    (employment,
    deptsal,
    saledesc
    )
    SELECT workstation,
    deptsal as deptsal,
    saldesc as saledesc
    OF pivoted_data
    UNPIVOT)
    deptsal-<-->
    FOR saldesc-<-->
    IN (d10_sal, d20_sal, d30_sal, d40_sal).<-->
    )

    also assign the log count "Insert" on the tab corresponding to your INSERT statement, so that you know how many rows you insert into the table.

    I hope this helps.

    BUT remember that this feature is out in Oracle 11 g.

  • Load data from one table into another table of 2 different schemes

    Hello

    We have a requirement to insert data into a table in a schema of a table that is in other schemas in ODI.

    We are able to do so by creating interfaces and mappings. But we now expect to do using SQL instead of ODI interfaces.

    Is it possible to do this using the SQL statements we have source and target data sources defined in ODI.

    should be like "Insert into src.table select * from tar.table'"

    Thank you...

    Hello

    If you try to load a db to another db using sql (sql free hand) instead of interfaces instructions.

    It is possible using procedures odi too.

    1. Select the project (designer navigator) odi mode

    2. create the new procedure. Then add the command.

    in this command on the source command on the tabs of the target.

    Enter the sql statements. See the screenshots below...

    I think this will help for you,

    Thank you best regards &,.

    A.Kavya

  • How to load data from a different column string

    Hello

    In a table, I get the data as a string

    101, SAM, 2000, 20, SALES
    "102, RAM, 3000, 30, MARKETING"

    I want to load this data into another column in the target table

    So I have to cut these data and having to load them into different target column.

    Select SUBSTR (101, SAM, 2000, 20, SALES,)
    INSTR('101,SAM,2000,20,SALES',',',1,4) + 1)
    Double;

  • Loading data from the table of operating system

    Hi all;

    MY DB vsersion is 10.2.0.5.0 in LINUX

    I have the .sql file in path X11R6.

    I am trying to load data by running the script load.sql , but I get the error message.

    > > CONTENT

    $ cat vi.sample_tab.sql

    create table tab1 (identification number,

    name varchar2 (15).

    Qual varchar2 (15).

    City varchar2 (15).

    Mobile number);

    $ vi load.sql;

    Start

    because me 1.100000 loop

    insert into table values (i,'* ',' MS ',' *', 1234554321);

    commit;

    end loop;

    end;

    /

    SQL > @sample.sql;

    Table created.

    SQL > @load.sql;

    insert into table values (i,'* ',' MS ',' *', 1234554321);

    *

    ERROR at line 3:

    ORA-06550: line 3, column 19:

    PL/SQL: ORA-00942: table or view does not exist

    ORA-06550: line 3, column 1:

    PL/SQL: SQL statement ignored

    SQL > select * from tab;

    TNOM TABTYPE CLUSTERID

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

    TABLE TAB1

    SQL > tab1 desc;

    Name                                      Null?    Type

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

    ID                                                 NUMBER

    NAME VARCHAR2 (15)

    QUAL VARCHAR2 (15)

    CITY VARCHAR2 (15)

    MOBILE PHONE NUMBER


    Thanks in advance.

    Hello

    GTS (DBA) wrote:

    Hi all;

    MY DB vsersion is 10.2.0.5.0

    I have the .sql file in path X11R6.

    I am trying to load data by running the script load.sql , but I get the error message.

    > CONTENT

    $ cat vi.sample_tab.sql

    create table tab1 (identification number,

    name varchar2 (15).

    Qual varchar2 (15).

    City varchar2 (15).

    Mobile number);

    ...

    Well, which creates a table called TAB1.  The last character of the name of the table is the numeral "1".

    $ vi load.sql;

    Start

    because me 1.100000 loop

    insert into table values (i,'* ',' MS ',' *', 1234554321);

    commit;

    end loop;

    end;

    /

    SQL > @sample.sql;

    Table created.

    SQL > @load.sql;

    insert into table values (i,'* ',' MS ',' *', 1234554321);

    *

    ERROR at line 3:

    ORA-06550: line 3, column 19:

    PL/SQL: ORA-00942: table or view does not exist

    ORA-06550: line 3, column 1:

    PL/SQL: SQL statement ignored

    Refers to another table.  The last character of the name of this table is the letter 'L '.

    SQL > tab1 desc;

    Name                                      Null?    Type

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

    ID                                                 NUMBER

    NAME VARCHAR2 (15)

    QUAL VARCHAR2 (15)

    CITY VARCHAR2 (15)

    MOBILE PHONE NUMBER

    This is the table that you created (its name ends with the digit "1"), not that used in the INSERT statement (its name ends with the letter "L").

  • Load data from one table to another

    Hi all

    Please help me for my sous condition.

    Oracle version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

    Rules
    -------
    (1) first two city must be loaded in city_1 and city_2.
    (2) if there are more than two cities, only two must be loaded first.
    (3) if only a city_1 is set, it must be loaded in city_1.

    drop table seven_cities;
    
    create table seven_cities
    (id     number,
     city_1  varchar2(100),
     city_2  varchar2(100),
     city_3  varchar2(100),
     city_4  varchar2(100),
     city_5  varchar2(100),
     city_6  varchar2(100),
     city_7  varchar2(100)
     );
     
     
    insert into seven_cities(id,city_1,city_2,city_3,city_4,city_5,city_6,city_7)
    values (1,'New York',null,null,null,'Chicago',null,null);
    
    insert into seven_cities(id,city_1,city_2,city_3,city_4,city_5,city_6,city_7)
    values (2,null,'Hyderabad','Delhi','Mumbai',null,null,null);
    
    
    insert into seven_cities(id,city_1,city_2,city_3,city_4,city_5,city_6,city_7)
    values (3,null,null,null,null,null,null,'London');  
    
    insert into seven_cities(id,city_1,city_2,city_3,city_4,city_5,city_6,city_7)
    values (4,null,null,null,'Sydeny','Melbourne','Paris','Berlin');
    
    commit;
    
    select * from seven_cities;
    
    drop table two_cities;
    
    create table two_cities
    (id number,
     city_1  varchar2(100),
     city_2  varchar2(100));
     
     Expected data to be loaded
     ----------------------------
    
    id       city_1          city_2
    1     New York             Chicago
    2     Hyderabad             Delhi
    3     London          null
    4     Sydney          Melbourne
    Thank you
    Rambeau

    The one I have already posted in response to your message duplicate (next time please do not submit duplicate messages):

    select  id,
            coalesce(city_1,city_2,city_3,city_4,city_5,city_6,city_7) city_1,
            nvl2(
                 city_1,
                 coalesce(city_2,city_3,city_4,city_5,city_6,city_7),
                 nvl2(
                      city_2,
                      coalesce(city_3,city_4,city_5,city_6,city_7),
                      nvl2(
                           city_3,
                           coalesce(city_4,city_5,city_6,city_7),
                           nvl2(
                                city_4,
                                coalesce(city_5,city_6,city_7),
                                nvl2(
                                     city_5,
                                     coalesce(city_6,city_7),
                                     nvl2(
                                          city_6,
                                          city_7,
                                          null
                                         )
                                    )
                               )
                          )
                     )
                ) city_2
      from  seven_cities
    / 
    
     ID CITY_1     CITY_2
    --- ---------- ----------
      1 New York   Chicago
      2 Hyderabad  Delhi
      3 London
      4 Sydeny     Melbourne
    
    SQL>
    

    And this solution, you are prompted by the solution of Tubby:

    with t as (
               select  id,
                       row_number() over(partition by id order by rownum) rn,
                       column_value city_1,
                       lead(column_value) over(partition by id order by rownum) city_2
                 from  seven_cities,
                       table(sys.OdciVarchar2List(city_1,city_2,city_3,city_4,city_5,city_6,city_7))
                 where column_value is not null
              )
    select  id,
            city_1,
            city_2
      from  t
      where rn = 1
    /
    
     ID CITY_1     CITY_2
    --- ---------- ----------
      1 New York   Chicago
      2 Hyderabad  Delhi
      3 London
      4 Sydeny     Melbourne
    
    SQL> 
    

    And if there is a concern on the use of the items in the collection without papers are read in the order behaviour, just create object & nested table types:

    create or replace
      type num_str_obj
        as object(
                  n number,
                  s varchar2(4000)
                 )
    /
    create or replace
      type num_str_list
        as table of num_str_obj
    /
    

    Now:

    with t as (
               select  id,
                       row_number() over(partition by id order by n) rn,
                       s city_1,
                       lead(s) over(partition by id order by n) city_2
                 from  seven_cities,
                       table(
                             num_str_list(num_str_obj(1,city_1),
                                          num_str_obj(2,city_2),
                                          num_str_obj(3,city_3),
                                          num_str_obj(4,city_4),
                                          num_str_obj(5,city_5),
                                          num_str_obj(6,city_6),
                                          num_str_obj(7,city_7)
                                         )
                            )
                 where s is not null
              )
    select  id,
            city_1,
            city_2
      from  t
      where rn = 1
    /
    
     ID CITY_1     CITY_2
    --- ---------- ----------
      1 New York   Chicago
      2 Hyderabad  Delhi
      3 London
      4 Sydeny     Melbourne
    
    SQL> 
    

    SY.

  • How to load data from the EBS to HFM

    I'm new to HFM. Now, I need to load the data from the EBS to HFM. How can I do this? Version of the EBS is R12.1 and HFM is 11.1.1.3.

    Hello

    Have you looked in the help of FDM 11.1 x version. It has adapters for EBS and you can also map the HFM entities.

    Thank you

    Partnered Bhatti

  • How to publish data from a table using the form

    Oracle forms6i

    Hai All

    I have download the data to the table of forms...

    My table T1 columns are in, out, intrinsically, introut, empname, empno


    and another table T2 consist of three columns is empno, date, time

    In table T2 time fields consist of symbol I, o... I mean IN, O OUT

    My Question is when an employee consist of 3 I - the three IN the time


    0815 I, 1200 I, 1415 I and OUT 3 times O 1245, 1445 O, O 1715 and empno is 001

    If there is no record for empno 001 then insert first 0815 I in table T1 in column IN time then

    to update 1200 intrinsically and 1245 update to Introut and 1415 up-to-date addin and 1445 to update addout


    Finally in 1715 to outtime

    If it is possible to do without Hardcoding the moment Pls tell with some good example


    Thanks in advance

    Srikkanth.M

    There now things are clear... whenever I have free I'll post the code u how to do this...

    for now, a few tips can help u

    -create the table to store operations travel so then u can't fix your code

    -Create the cursor on the T1 line through all the records.

    -Control what empno and action i.e. the current cursor (I or O) exists on the same date in T2 or not

    -otherwise exists insert a new record check also the SHIFT is coming in time IF is between MAJ 0815 and 1645 and action is 'I' then insert record and column values accordingly

    s ' there is, then update the record of the place where empno = cur.empno and attendance_date = mydate;

    It may be useful

    Baig,
    [My Oracle Blog | http://baigsorcl.blogspot.com/]

  • How to export data from one Windows a/c to another on the same PC account?

    I had to open a new Windows a/c since my original one would not keep my browsing history despite a number of tweaks and fixes.

    The new account history that is well preserved, BUT how do I export all my data (music, docs... the whole damned much!) of the original a/c to the new?

    Would appreciate any help people!

    Graham

    Hi Graham,

    You can transfer data from the other user account to a new user account by using the article "difficulty a user profile is corrupted.

    Difficulty a user profile is corrupted: http://Windows.Microsoft.com/en-us/Windows7/fix-a-corrupted-user-profile

    Let us know if you need assistance with any windows problem. We will be happy to help you.

  • Loading data from multiple tables in essbase using ODI

    Hello

    We have a scenario where the data comes from more than one table. I would like to know how ODI will load the data for the right combination of members

    Hello

    Consider each data table has a field that corresponds to the other table. You can simply drag the source interface data warehouses and create a join between the tables.

    See you soon

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

Maybe you are looking for

  • Download Manager stops when I turn off Firefox

    I have tried twice now; It didn't used to be like that. I have a current download. When I disable the Firefox, the download ends, too. My version is Firefox 24. How can I keep the download? Thanks for your help.

  • I got a biohd-8 error code when my office made a diagnostic test.

    HP Pavilion a666ot windows Vista 32 bit Biohd-8 error test of ST 3200822as (5LJICDW3) I installed a second hard drive to recover some files for my daughter. But the test was on my C drive; not the added disk. Thank you

  • invisible files in the USB

    I copied some files & folders in a Jetflash pendrive from a Vista admin account. Files are visible only in the personal account. Now, the account is accidentally deleted & I'm unable to view the files & folders. Thank you & best regards Amarnath

  • Windows 7 does not start. gives error 305 on hd on my pavilion dv7

    In a year that cell phone starting acting funny. Sometimes would not start and stop at different times. I now can not able to boot at all. It gives me an error not design start-up, and then disk is full ect. My wife had this for 10 monthss when it ca

  • ICS error: the specified service does not exist as an installed service.

    My computer is running Windows 7 64 bit.Usually, I would have no problem with ICS as I do on a regular basis. After the failure of MS Security Essentials boot after a few restart of the system.I uninstalled and installed Avast free Antivirus 7. Since