Create arrays 1 2 tables with conditions of

Hello

In my accounts from the table, I have a list of 700 account with their names and so on.

I have other tables, 1650 position code.

In a new array, I need to create 1 account for each code position

I'm going to post code 1650 * 700 accounts = 1 155 000 total

Table position code:

Column 1: key

Column 2: the position code

Column 3: job description

Account of the table:

Column 1: key

Column 2: Account number

Column 3: Account name

NEW TABLE

Column 1: key

Column 2: the position code

Column 3: Account number

Column 4: Account name

What is the best way to do this fill?

Hello

Dan - jr wrote:

Hello

In my accounts from the table, I have a list of 700 account with their names and so on.

I have other tables, 1650 position code.

In a new array, I need to create 1 account for each code position

I'm going to post code 1650 * 700 accounts = 1 155 000 total

Table position code:

Column 1: key

Column 2: the position code

Column 3: job description

Account of the table:

Column 1: key

Column 2: Account number

Column 3: Account name

NEW TABLE

Column 1: key

Column 2: the position code

Column 3: Account number

Column 4: Account name

What is the best way to do this fill?

Button that goes into the new table:

INSERT INTO new_table

(key, position_code, account_number, account_name)

SELECT p.key, p.position_code, a.account_number, a.account_name

OF position_code p

CROSS JOIN has a

;

Do you really want to reproduce position_code and account_name in the new table?

Tags: Database

Similar Questions

  • We can create a view or table with a form button?

    We can create a view or table with a form button using forms 6i?
    If Yes, what will be the command?

    Gul says:
    We can create a view or table with a form button using forms 6i?
    If Yes, what will be the command?

    Yes. You can. Use the FORMS_DDL built-in. For example

    BEGIN
      Forms_DDL('create table temp(n NUMBER)');
      IF NOT FORM_SUCCESS THEN
        Message ('Table Creation Failed');
      ELSE
        Message ('Table Created');
      END IF;
    END; 
    

    Hope this helps

    Hamid

  • SQL with conditions

    Hello

    I need to generate a summary table with conditions. Here are the details:

    create the table tb_class (classId number (5), studentNum number (5));

    create table tb_grade (classId number (5), gradeNum number (5)):

    insert into table values tb_class (101, 100);

    insert into table values (201, 102) tb_class;

    insert into table values (102, 103) tb_class;

    insert into table values tb_grade (101, 1);

    insert into table values (102, 1) tb_grade;

    insert into table values (201, 2) tb_gradfe;

    I would like to get the total number of students registed in a specific shade with a SQL, the result is expected as follows:

    GradeNum studentNumRegistered studentNumNonRegisted

    1                         203                                      102

    2                         102                                      203

    Is that what you are looking for?

    WITH subsum AS
     (SELECT tb_grade.gradenum,
             SUM(tb_class.studentnum) AS students
      FROM   tb_class
      JOIN   tb_grade ON tb_grade.classid = tb_class.classid
      GROUP  BY tb_grade.gradenum)
    SELECT subsum.gradenum,
           SUM(subsum.students) AS studentnumregistered,
           SUM(subsum1.students) AS studentnumnonregistered
    FROM subsum
    JOIN subsum subsum1 ON subsum1.gradenum != subsum.gradenum
    GROUP  BY subsum.gradenum;
    
  • Bug: 4.1.1 as a table with all the columns of conditionals

    I need to make all the columns in a tabular form conditional because in some situations the editable elements must not appear. For some reason, simply change the columns in the form of work conditional stop valves, the ApplyMRU/ApplyMRD process works but not action lines changed. I can't understand why all or of a workaround.

    You can easily replicate this in 4.1.1 creating a form of table with the wizard by selecting a column in the form. Then subordinate the selector colunn line and your editable column using the expression 1 = 1 plsql. The form is displayed all the same with these real conditions but it does not work. Weird how?

    Rod West

    Rod,

    In your scenario, the tabular rendering engine may not place the hidden status columns, internal tabular form in your form, i.e. the columns that contain amounts of control, etc.. The logic that puts these columns search the last column unconditional, visible in the form of your table and includes hidden fields here. If you need at least a column that is always indicated to do so. This can be an empty column. I filed a bug (#13881803) to do this, so we can look to improve this logic.

    Kind regards
    Marc

  • Form on a Table with report - Auto number

    Hello

    Scenario:
    I want to create 'Form on a table with report' which would allow my users add records...

    Steps and questions
    I have created a table with a field named "TRACKING_NO" as a type of automatic numbering in MS Access and there is a primary key... I intended to use it to link the report to the form
    When I downloaded the array to Oracle, it changed the varchar2 type... can you please advice how to change back to automatic numbering...?
    and it'll work if my user adds a record to the table (using APEX built in option to create a record)...?

    Thanks in advance

    Hello
    That's what I'd do.
    1. download the MS Access table, lets call it TAB_A
    2. using SQL-workshop get the DDL (SQL statement) for this table.
    3. change names or data types as required
    4. create a new table with the DOF, lets call it TAB_O
    5 copy the contents of TAB_A to TAB_O (TAB_O IN INSERT for example (id, colx, coly) SELECT TO_NUMBER (tracking_no), col1, col2 FROM TAB_A ;))
    6. create a sequence that begins with the last PK + 1 table TAB_A
    7 Add a trigger to TAB_O to use this sequence to fill his PK

    Furthermore, work with APEX requires a good understanding of the Oracle SQL and PL/SQL, no matter what anyone says, even Oracle.

    Regards Garry

  • 5.6.1 pages: How to create a table with more than 999 lines?

    5.6.1 pages: How to create a table with more than 999 lines?

    The table on Pages v5.6.1 line selector is limited 3-digit, as it is in Pages ' 09 v4.3. Either use LibreOffice Writer, who does not have any constraint line on processing tables 3-digit, or any application spreadsheet for top 3-digit row needs.

  • Create triggers in the table, sequence, insert and update with "model"?

    It must be of rtfm, trial and error thing but you wanted to ask, is it possible to have models or similar automation for the following scenario:

    1.), I add the table to the logic model

    2.) Using glossary I transform a relational model that was recovered / synchronized with the data dictionary

    3.) then I have the new table to add

    -but

    I would then have auto-DDL of to be synchronized to database:

    -create sequence for the id column

    -create table

    -create indexes for the id column pk

    -Create triggers for insert and update

    -l' idea is to have db_created_dt and db_modified_dt defined in the table, so that each table has them to the fields of record etc.

    -activate the triggers

    Each of them following the same naming convention.

    Similarity with approx. generator Apex workshop utils sql create table of the copy paste "excel" that creates 'id' - column + sequence and insert the trigger.

    rgrds Paavo

    Hi Paavo,

    most of the steps can be made in one or other way

    -create sequence for the id column

    -create table

    -create indexes for the id column pk

    If you want to start in the logic model and you don't want to have the ID column in the logic model and select 'Create the surrogate key' checkbox in the dialog entity - you will get an identity column in the relational model and the version of database and settings in ' preferences > Data Modeler > model > physics > Oracle "you can set the sequence generation and the trigger for taking in load.

    fields of record defined in the table, so that each table has them

    You can add the same set of columns in all tables with the transformation script 'model of Table... ».

    You can also look here Oracle SQL Developer Data Modeler 4.1 user - defined DDL generation using transformation scripts

    to see how to grant your DDL generation using the transformation script. DM comes with example to generate separate tables of logging and triggers. You can create your build script of triggers that support logging in these common columns.

    Philippe

  • How to create a table with these dimensions?

    Still new in Indesign, but I need to create a table like the one below.

    Screen Shot 2015-03-10 at 2.31.25 AM.png


    Select the text tool, I created a block of text and then insert a table. However, I'm lost as to how to change the top line for the length of the two columns from the bottom.
    I looked at the options of panel paintings, but it only allows me to change the number of lines and columns.

    All advice is appreciated. Thank you.

    You must create a table with two rows and two columns.

    To select the first line and click "merge cells".

  • Create table with several Collections of data control

    Hello

    I have a requirement about to display data in a table. It shows simple, but certain columns in the table are within a collection, and the others are in another collection. I read this chapter Creation of ADF Databound Tables - 11 g Release 1 (11.1.1.7.0), and she explains to create the table with a collection.

    I have no knowledge on the model, I know just as control data, so what should I do? :

    -Ask for the template designer to redraw the control of data to include a collection with all the data?

    -Try to work with the actual data control? If so, how can I create the table several Collections of data control?

    Plese let me know if there is another solution. I work with JDeveloper 11.1.1.7.

    Thank you!

    AAPDL

    Hello

    You can have a managed bean that e... g exposes an ArrayList of objects. This can then binds to the value property of the table. If the object sets the information of table row combination that you get multiple iterators (collections), then the table will display the joined data.

    Frank

  • Creating tables with Muse...  Excel copy / paste?

    Can I create a table with Muse?

    I have no knowledge of HTML... learning HTML can be a good idea, but I don't really have time for that right now.

    Can I add a table Excel for Muse?  Or y at - it a simpler way to create the table with the Muse?

    You can insert page Muse excel table or use any html generator to create a table and use the exit code.

    This thread will provide the exact steps for inserting table on page Muse of excel:

    https://forums.Adobe.com/thread/1364446?TSTART=0

    With html generator, you will not need to define or add any code on your side, just select the options you want in your table and then copy the code insert html into the page of Muse.

    http://www.tablesgenerator.com/html_tables

    Thank you

    Sanjit

  • Create a table with one column '& '.

    Hi all

    I need to create a column on my table with the character &. I try this way:

    SQL > CREATE TABLE 'CRIMIS_CARGA '. "" TM_EXCEL_CONSEN ".
    2 (NUMBER OF 'LINEA',
    3 'ID_INSTITUCION & ASSOCIATE' VARCHAR2 (510 char));

    but I can't because that ASD sqlplus to associate value...

    The ideas people?

    Kind regards
    dbajug

    set the escape ' \'

    Oracle@test > CREATE TABLE 'TM_EXCEL_CONSEN '.
    2 (NUMBER OF 'LINEA',
    3 VARCHAR2 (100)) 'ID_INSTITUCION\ & ASSOCIATE;

    Table created.

    Oracle@test > desc 'TM_EXCEL_CONSEN '.
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    NUMBER OF LINEA
    VARCHAR2 (100) ID_INSTITUCION & ASSOCIATE

  • How to create a table with muse?

    How can I create a table with muse?

    Muse do not support building tables at this time.

    However, you can add HTML table to the object-> the option Insert HTML code as a way to get around this.

    http://www.w3schools.com/HTML/html_tables.asp

    You can even try lining up a few text boxes with or without contour applied to create a tabular look editable in design mode.

    Thank you

    Vinayak

  • Need to create a primary key by using sequence in a table with records.

    Hello
    I want to create a primary key for a table that is already having a huge number of records. Am thinking to create the primary key by using a sequence generator. Could someone tell how can I do this using SQL or PL - SQL.

    Kind regards
    SK

    Hello

    Try this...

    SQL> select * from emp;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    
    14 rows selected.
    
    SQL> create sequence emp_empno_seq
      2  start with 1
      3  minvalue 1
      4  maxvalue 999999999999999999999
      5  increment by 1
      6  nocache
      7  noorder
      8  nocycle;
    
    Sequence created.
    
    SQL>
    SQL> ed
    Wrote file afiedt.buf
    
      1  update emp
      2* set empno=emp_empno_seq.nextval
      3  /
    
    14 rows updated.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> select * from emp;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
             1 SMITH      CLERK           7902 17-DEC-80        800                    20
             2 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
             3 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
             4 JONES      MANAGER         7839 02-APR-81       2975                    20
             5 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
             6 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
             7 CLARK      MANAGER         7839 09-JUN-81       2450                    10
             8 SCOTT      ANALYST         7566 19-APR-87       3000                    20
             9 KING       PRESIDENT            17-NOV-81       5000                    10
            10 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
            11 ADAMS      CLERK           7788 23-MAY-87       1100                    20
            12 JAMES      CLERK           7698 03-DEC-81        950                    30
            13 FORD       ANALYST         7566 03-DEC-81       3000                    20
            14 MILLER     CLERK           7782 23-JAN-82       1300                    10
    
    14 rows selected.
    

    Thank you
    Prakash P

  • Create the table with the environment variables

    Hi all
    When an event occurs, I would create a table by a planning procedure.
    I can create a table with these last or similar syntax:

    create table % s_ %t in select acme_ * from a;

    I would use this syntax because this event could be spend more time per day and so I can check.
    is this possible?

    Thank you very much
    Ciao
    Alberto

    Albertofro wrote:
    Hi all
    When an event occurs, I would create a table by a planning procedure.
    I can create a table with these last or similar syntax:

    create table % s_ %t in select acme_ * from a;

    I would use this syntax because this event could be spend more time per day and so I can check.
    is this possible?

    Thank you very much
    Ciao
    Alberto

    To dynamically create a table, you must use EXECUTE IMMEDIATE. If you want your table to be padded with timestamp name you can do it with the function TO_CHAR and SYSDATE.

    An example

    execute immediate 'create table acme_' || to_char(sysdate, 'DDMMYYYYHH24MISS') || ' as select * from a';
    
  • create table with references to values in another schema

    Experts,

    Is it possible to create the table in a schema with the references pointing to column values in a different pattern?

    Say, I have 2 diagrams A and B

    Has the employee table and and B dept table, I want to run him below modifies the declaration, it will work?

    ALTER TABLE A.EMP ADD)
    FOREIGN KEY (DEPT_ID)
    REFERENCES B. DEPARTMENT (DEPT_ID));

    I know there is no sense in doing this, still would like to know to make a temporary workaround solution.

    Kind regards
    LIBERATOR

    Published by: manon on October 21, 2011 12:30 AM

    Yes it is possible with the right privilege:

    SQL> grant connect, resource to a identified by a;
    
    Grant succeeded.
    
    SQL> grant connect, resource to b identified by b;
    
    Grant succeeded.
    
    SQL> connect b/b
    Connected.
    SQL> create table p (x int primary key);
    
    Table created.
    
    SQL> grant references on p to a;
    
    Grant succeeded.
    
    SQL> connect a/a
    Connected.
    SQL> create table c (y int);
    
    Table created.
    
    SQL> alter table c add foreign key (y) references b.p(x);
    
    Table altered.
    

Maybe you are looking for

  • Then vs loop loop delay

    Is there a difference between a Timed loop and loop a while with a wait inside function?I tried to test the difference in running one of each loop in parallel, and then checking the speed: From what I've seen, they run either exactly the same or less

  • Configuring updates step 3 of 3. 0% complete

    I realize that there may be several other threads on this topic but, having looked around the web, none of the solutions proposed (including the 949358 section of Microsoft) works for me. My sons laptop has Vista pre-installed (no disk). When I use F

  • Media profiles created by papajohn on its website

    I downloaded photoshop 3 but also Director of windows on another computer window xp that I bought recently and I have try to add media profiles, created by papajohn on its Internet site. However, I am constantly messages "file is corrupted", how do I

  • QUESTION OF INSTALLATION REGARDING LEGALITY

    Is it legal for me to install my 64-bit Windows 7 HP, which was installed on my desktop PC on my laptop?  I replaced with 64-bit Windows 7 HP on my desk with the upgrade to Windows 7 Professional 64 - bit.  Now I have my 64-bit Vista on my laptop tha

  • app VLC no video

    No video in vlc windows 8 app only noise, doesn't work very well on hemen office but not in the patching? because I think the app is simple and cute