Insert the loop by a report or insertion using a link of the column

Hello!

I think I have an easy one.

I created a site that lists 'problems' with the curriculum of the University. If a curriculum developer sees something that needs to be updated, they use this site to connect to the 'question' so we have a drop-down list of how the program has changed for the particular course or courses. Some 'problems' cover several courses, if a table has been created to allow the issue to join courses as needed.

The 'Courses' table contains a list of all courses at University
The 'Issue_Courses' table combines the primary key of the 'question' and the 'course' and creates the association between the questions and the courts.

The users use of page to create the associations has a report called 'add_courses' which can be consulted and filterable so that the user can refine the list of courses they want to see (the list is well into the thousands), and this report contains a column with checkboxes. This page also contains a hidden field containing the primary key of the issue, "p13_Issue_ID."

I would like to create an insert query that takes hold of the primary key of the issue of "p13_issue_ID", she travels around the report, by inserting a new record for each box checked in the report. Any help would be great! Certainly, my sql is pretty week.

Another option that I think would work, if possible, to have a "link in the column" that simply runs the insertion process by entering the primary key for the problem of "p13_issue_ID" and the id of the course of the report. Then, the user could just click on a link 'Add' or something similar on the report, which would go to the insert statement and essentially create this association. Is this possible?

Thanks in advance!

Published by: 846852 on March 23, 2011 15:12

Published by: 846852 on March 23, 2011 15:14

that should have been this line

1 IN 1.APEX_APPLICATION. G_f01. COUNTY

I typed 1 instead of I

To take

BECAUSE me IN 1.APEX_APPLICATION. G_f01. COUNTY

Tags: Database

Similar Questions

  • Robo help 9-request to insert a URL link in the Help Guide.

    I've been asked to insert a URL link in the help guide I created.  Here is a picture of the menu using Flash generated where the link of the URL they should go:

    FlashHelp Link.jpg

    Is it possible to do this RoboHelp?

    Thank you.

    Hello

    Yippper. Just change the table of contents and insert a page there. Configure the page to point to the URL you want.

    See you soon... Rick

    Useful and practical links

    Wish to RoboHelp form/Bug report form

    Begin to learn RoboHelp HTML 7, 8 or 9 in the day!

    Adobe Certified RoboHelp HTML Training

    SorcerStone blog

    RoboHelp EBooks

  • Trigger for INSERTION OF THE COLUMN exists?

    Hello Experts

    I just wonder that relaxation of the COLUMN INSERT exists as UPDATE OF THE COLUMN? If so, it seems illogical to use insert the trigger. Because can not insert for a spesific columns that we effect the registration worldwide, right line?

    Thank you

    PRIOR TO INSERTION OF THE MEMBER ON AVLMEMBERS ID

    Don't have compile this code of yours? View the results of the compilation of this trigger.

    There is NO such syntax as a review of the language PL/SQL doc will show you

    CREATE TRIGGER statement

    dml_event_clause

    Specifies the trigger instructions for simple_dml_trigger or compound_dml_trigger . The database enables the trigger in the existing user transaction.

    DELETE

    Causes the database to activate every time a DELETE statement drops a line to table or table on which view is defined.

    INSERT

    Causes the database to activate every time a INSERT statement adds a line to table or table on which view is defined.

    UPDATE [columns [, column]]

    Causes the database to activate every time a UPDATE statement changes a value in a specified column. Default: the current database the trigger every time that a UPDATE statement changes a value in a column of table or table on which view is defined.

    If you specify a column , then you cannot change its value in the body of the trigger.

  • Insert/update the column with the clob data type

    Hi all

    ORCL Version: 11g.

    I have a table with the clob data type.

    Test12

    (col1 clob);

    I'm trying to insert/update to update the column with more than 4000 characters.

    But due to the limitation of tank 4000, I could not Insert/Update.

    Need your help in resolving this issue.

    THX

    Rod.

    The limit of 4000 characters is incorrect.  That pertains only to the varchar2 data type.  A clob can hold more than 4 G.

    Here is an example that shows how to insert it, I found...

    Otherwise, here is a way 'dirty' to do.

    insert into your_table (COLA, COLB)

    values

    (PRIMARY_KEY, PART 1 OF DATA)

    ;

    Update your_table

    Define COLB = COLB | PART 2 OF BIG DATA

    where COLA = PRIMARY_KEY;

    Update your_table

    Define COLB = COLB | PART 3 OF BIG DATA

    where COLA = PRIMARY_KEY;

    .. and so on...

    I don't know that I personally recommend the second style...  But he could do the job.

  • trimmed values when inserting in the column

    Hi Experts,
    I tried to insert the '% t & U' value in a column in oracle table database, but the value '% t' is getting inserted into the column. string once % skiped. Can someone tell me why this happened?

    Thank you
    SQL> create table test_string(str varchar2(10));
    
    Table created.
    
    SQL> insert into test_string values('T%&U' );
    Enter value for u:
    old   1: insert into test_string values('T%&U' )
    new   1: insert into test_string values('T%' )
    
    1 row created.
    
    SQL> select * from test_string;
    
    STR
    ----------
    T%
    
    SQL> set define off
    SQL> insert into test_string values('T%&U' );
    
    1 row created.
    
    SQL> select * from test_string;
    
    STR
    ----------
    T%
    T%&U
    
  • Insert rows in based on the data in the column in the Table_A Table_B

    Hello

    I have a column (STRING) in the Table_A called specialization that is imported from an extenral application.

    Data in this column is supplied as follows:

    "Spec_A" - If the user wants to get Spec_A
    "Spec_A | Spec_B '-if the user wants to get both Spec_A and Spec_B.
    "Spec_D | Spec_F | Spec_W' if the user wants to get Spec_D, F, W, and so on.


    So basically all the options are in the same column, separated by ' | '. I don't have an option to change this data will always come like that.
    For each card, the user must meet certain criteria, so I need these data resulted in another table, in rows.

    I'm looking a PL/SQL script which will analyze the string in the column of specialization and insert lines depending on the number of specialzations in Table_B with the user_name and Spec option.

    So if the user name is Steve, and there in the column specialzations = ' Spec_A | Spec_B' I would like 2 lines insterted in Table_B, 1 for Steve Spec_A and the other for Steve with Spec_B.

    Thanks for the help,
    Diez

    Hi 837311,

    Here's a way to do what you want:

    SQL> select * from table_A;
    
    USER_NAME  SPECIALIZATION
    ---------- -------------------------
    user1      Spec_A
    user2      Spec_A | Spec_B
    user3      Spec_D | Spec_F | Spec_W
    
    SQL> select * from table_B;
    
    no rows selected
    
    SQL> SELECT      t.user_name
      2  ,      trim
      3           (regexp_substr(specialization,'[^|]+',1,s.lev)
      4           )    AS specializ
      5  FROM      table_A t,(SELECT    LEVEL    AS lev
      6      FROM    (
      7              SELECT  MAX (LENGTH (regexp_replace(specialization,'[^|]') )
      8                           + 1
      9                          )    AS  nb_max
     10              FROM    table_A
     11          )
     12      CONNECT BY    LEVEL    <= nb_max) s
     13  where  s.lev <= LENGTH (regexp_replace(t.specialization,'[^|]')
     14                           || 'a'
     15                            )
     16  ORDER BY  t.user_name,s.lev
     17  ;
    
    USER_NAME  SPECIALIZ
    ---------- ----------
    user1      Spec_A
    user2      Spec_A
    user2      Spec_B
    user3      Spec_D
    user3      Spec_F
    user3      Spec_W
    
    6 rows selected.
    
    SQL> insert into table_B(user_name,specialization)
      2  SELECT      t.user_name
      3  ,      trim
      4           (regexp_substr(specialization,'[^|]+',1,s.lev)
      5           )    AS specializ
      6  FROM      table_A t,(SELECT    LEVEL    AS lev
      7      FROM    (
      8              SELECT  MAX (LENGTH (regexp_replace(specialization,'[^|]')
      9                           + 1
     10                          )    AS  nb_max
     11              FROM    table_A
     12          )
     13      CONNECT BY    LEVEL    <= nb_max) s
     14  where  s.lev <= LENGTH (regexp_replace(t.specialization,'[^|]')
     15                           || 'a'
     16                            )
     17   ;
    
    6 rows created.
    
    SQL> select * from table_B order by user_name, specialization;
    
    USER_NAME  SPECIALIZATION
    ---------- -------------------------
    user1      Spec_A
    user2      Spec_A
    user2      Spec_B
    user3      Spec_D
    user3      Spec_F
    user3      Spec_W
    
    6 rows selected.
    
    SQL>
    

    If your requirements are not met, let me know it.

    Edited by: Manguilibe Jan 20, KAO. 2012 15:39

    Edited by: Manguilibe Jan 20, KAO. 2012 15:44

  • Insert using TO_NUMBER does not seem to accept the decimal value

    Oracle 10g

    I'm trying to insert a decimal value in a table from another table oracle oracle. The column of the source table is a data type
        "PLOTSIZE10_30CM"    VARCHAR2(4 BYTE),
        "PLOTSIZE30_50CM"    VARCHAR2(4 BYTE),
        "PLOTSIZE50CM"       VARCHAR2(3 BYTE),
    The destination table contains the following:
        "PLOT_SIZE_10_30CM" NUMBER(7,0),
        "PLOT_SIZE_30_50CM" NUMBER(7,0),
        "PLOT_SIZE_50CM"    NUMBER(7,0),
    When I run the insert statement as the following decimal values are not inserted into the destination table.
    SQL> SELECT DISTINCT PLOTSIZE50CM FROM IMPORT_DATA WHERE STAND_ID = 23;
    
    PLO
    ---
    0.2
    
    SQL>
    SQL> INSERT INTO
      2  psp_plot_measurements
      3  ( species_major
      4  , plot_location_id
      5  , codominant_height
      6  , regen_density_primary_code
      7  , regen_density_secondary_code
      8  , PLOT_SIZE_10_30CM
      9  , PLOT_SIZE_30_50CM
     10  , PLOT_SIZE_50CM
     11  )
     12  SELECT DISTINCT species_major
     13       , '2'
     14       , height_codom
     15       , regen_prim
     16       , regen_sec
     17       , TO_NUMBER(plotsize10_30cm)
     18       , TO_NUMBER(plotsize30_50cm)
     19       , TO_NUMBER(plotsize50cm)
     20    FROM import_data
     21    WHERE stand_id = 23;
    
    1 row created.
    
    SQL>
    SQL> SELECT PLOT_SIZE_50CM FROM PSP_PLOT_MEASUREMENTS;
    
    PLOT_SIZE_50CM
    --------------
                 0
    See you soon
    Ben

    Hi Ben,

    If the destination table have the column as a Number (7.0) and then how you can store a decimal value.

    The destination table contains the following:

    "PLOT_SIZE_10_30CM" NUMBER(7,0),
    "PLOT_SIZE_30_50CM" NUMBER(7,0),
    "PLOT_SIZE_50CM"    NUMBER(7,0),
    

    Look at sample scenario-

    SQL> CREATE TABLE TEST1(COL NUMBER(7,0));
    
    Table created.
    
    SQL> CREATE TABLE TEST2(COL NUMBER(7,1));
    
    Table created.
    
    SQL> INSERT INTO TEST1(COL) VALUES(1.234);
    
    1 row created.
    
    SQL> INSERT INTO TEST2(COL) VALUES(1.234);
    
    1 row created.
    
    SQL> INSERT INTO TEST1(COL) VALUES(0.234);
    
    1 row created.
    
    SQL> INSERT INTO TEST2(COL) VALUES(0.234);
    
    1 row created.
    
    SQL> SELECT * FROM TEST1;
    
           COL
    ----------
             1
             0
    
    SQL> SELECT * FROM TEST2;
    
           COL
    ----------
           1.2
            .2
    
    SQL>
    

    If you want to store the decimal value, you must modify the destination table.

  • Problem in inserting records into a table (MS Access) where the name of the column against

    I have a table with the name of column say first #Name and when I insert a value in the table it gives an error and it does not let me insert some values which he... Is it possible to enter the value in this column by fleeing this hash. I have a constraint that I can not change the name of the column...

    If it was Oracle you would put quotes around the name of the column. Not sure if happens the same for MS Access, because I do not play with the toy databases.

    for example

    Insert into tablename ("First#Name") values ('Fred');
    
  • using the loop in matrix report

    Dear all,

    I want to generate a turnout report.the user will enter just the start_date and the end_date.
    Suppose that the days between arguments start_date and the end_date are 30 days.i want to use those 30 days for the columns in the matrix report.i use the following loop.

    because loop me in 1.30
    (I) return;
    end loop;


    She just return 1 for each column as
    1 1 1 1 1 1 1... and so on
    Instead, I want it to appear
    1 2 3 4 5 6 7 8 9 10... and so on until 30.

    How would I do that?

    Thank you and best regards.

    Lets say that emp 1 was late 03 - Jan, emp 2 was absent on 04-Jan and emp 4 was behind on 07 - Jan. And if you run the report from Jan 01 - Jan - 10, it should give dates of Jan. 01 - Jan to 10. You can use the query like this (this is just an example, you must change according to your requirement. The part that provide daily, you can use as it is):



    SELECT EMP_LATE_ABSENT.EMPNO,
    TO_CHAR(ALL_DATES.ALL_DAYS,'DD') ALL_DAYS,
    EMP_LATE_ABSENT.HOURS_LATE
    FROM

    (
    SELECT ALL_DAYS
    FROM (
    SELECT TO_DATE(:start_date,'DD-MON-RR') + LEVEL - 1 ALL_DAYS
    FROM dual
    CONNECT BY LEVEL <= TO_DATE(:end_date, 'DD-MON-RR') - TO_DATE(:start_date,'DD-MON-RR') + 1
    )
    ) ALL_DATES,
    (
    SELECT 1 EMPNO,
    TO_DATE('03-JAN-2009') DATE_LATE_ABSENT,
    3 HOURS_LATE
    FROM DUAL
    UNION
    SELECT 2,
    TO_DATE('04-JAN-2009'),
    NULL
    FROM DUAL
    UNION
    SELECT 4,
    TO_DATE('07-JAN-2009'),
    6
    FROM DUAL
    ) EMP_LATE_ABSENT
    WHERE ALL_DATES.ALL_DAYS = EMP_LATE_ABSENT.DATE_LATE_ABSENT(+)
    ORDER BY EMP_LATE_ABSENT.EMPNO,
    ALL_DAYS

    So result would come up like this:

    Emp All Days Hours Late
    1 03 3
    2 04
    4 07 6
    01
    02
    05
    06
    08
    09
    10


    And when you create a matrix report, from 01 to 10 days would be in the form of columns, used as lines and values of hours/null as cell values.

    I hope this helps.

  • ADF: how to insert the character of new line in the column of VO?

    Hello world

    IM using Jdev 11 G.
    I have a VO with 5 columns appear on the page of the ADF. (VO a total 8 columns)
    column 1 is the combination of 3 columns. I concatenated 3 columns and add the new line character after each column Chr (13).
    VO query works very well as a toad. the columnn displays each column value concatenated after a newline character, but the same query does not work in the ADF.
    The column that is the concatenation of the 3 columns and should display with the new line character does not display the new line character its just concatenation of the 3 values and display on the page.

    Wat could be the solution for this in the ADF?

    Thank you.

    Column does not have the property to escape. It is part of the output text.

    Something like

                        
                            
                        
    

    Arun-

  • SET COLSEP does not insert character if the column is null or empty - please help

    Hello experts,
    This is probably a question of beginner and I can't seem to find the answer. I train at the output of the coil of a simple SQL query to a file .txt or .csv using colsep as the column separator that prints fine except when there is a column value empty. Here is my SQL:
    recsep off Set
    set linesize 240
    NewPage 0 value
    set pagesize 9999
    the value of colsep «;»
    BREAK ON JUMP MESSAGE_SET_NBR 1 ON LAST_UPDATE_DTTM
    Select D.MESSAGE_SET_NBR, S.DESCR, D.MESSAGE_NBR, D.LAST_UPDATE_DTTM, D.MESSAGE_TEXT
    PSMSGCATDEFN D, PSMSGSETDEFN S
    WHERE
    D.MESSAGE_SET_NBR = S.MESSAGE_SET_NBR AND D.MESSAGE_SET_NBR BETWEEN 999 AND 19999
    ORDER by D.MESSAGE_SET_NBR, D.MESSAGE_NBR ASC, S.DESCR
    Here is an example of the data that are generated. The missing splitter really screw up my spacing outfile. Please note the last line that is missing from the colsep the missing date.

    18177; Applicant tracking messages. 2582; APRIL 13 07; Some applicants, %1, do not have an email address in the order
    ; Applicant tracking messages. 2613; 7 FEBRUARY 07; Rejected candidates
    ; Applicant tracking messages. 2614; 4 APRIL 07. Select the employee to whom the plaintiff is routed
    ; Applicant tracking messages. 2615; 7 MARCH 07; The name of this source is in use.
    ; Applicant tracking messages. 2616; JULY 2 09; Subsource name is in use.
    ; Applicant tracking messages. 2617; 12 OCTOBER 10; Jurisdiction is not specified for one or more skills.
    ; Applicant tracking messages. 2618; Please enter a value in the field before continuing.

    Thanks in advance for your help!... Jason

    Published by: user957626 on June 16, 2011 14:40

    Hi Jason,

    Welcome to the forum!

    Usually, when you go to waiting a .csv file, you want to concatenate the columns together as

    select empno || ';' || ename || ';' ||job from emp;
    

    Downside is that you need to SET 0 PAGES and then produce your own header.
    Something like

    PROMPT Empno;Ename;Job 
    

    Alternatively, if you want to pursuit the COLSEP approach, you can play with

    SET NULL text
    

    Concerning
    Peter

  • Insert the current date in the column of a table advanced

    Hello

    I created a ViewObject this query for the current date. Now please help me extract this date value and place in an advanced table column. The column comes after clicking on the button Add another line tha. After you click the date button value would automatically come in the column.

    Hello

    If (tableBean.getName () .equals (pageContext.getParameter (SOURCE_PARAM)))
    (& ADD_ROWS_EVENT.equals (pageContext.getParameter (EVENT_PARAM)))
    {
    ...
    }

    where tableBean is the handle to your table.

    Kind regards
    Out Sharma

  • Calling a process from a link to the column in a report

    Apex 4.2

    I have a classic report which has links to the column. I can't call a process when you click on these links. I want to insert a record into the table when you click on this link. So I have a process for updating the database

    {code}

    DECLARE

    l

    _vc_arr2 APEX_COLLECTION_GLOBAL. VC_ARR2;

    BEGIN

    -apex_application.g_print_success_message: = ' sector selection: ' | : P122_SECTOR_SELECTION;

    l_vc_arr2: = APEX_UTIL. STRING_TO_TABLE(:P122_SECTOR_SELECTION);

    FOR z IN 1.l_vc_arr2.count LOOP

    -apex_application.g_print_success_message: = 'TEST2 ';

    -htp.p (l_vc_arr2 (z);

    insert into ISECTOR_PHASE1_ACTIVATION

    (PHASE_1_ACTIVATION_DATE, INSPECTION_SECTOR_ID, HIGH_WATER_EVENT_ID)

    values (: P122_ACTIVATION_DATE.l_vc_arr2 (z),: P0_HIGH_WATER_EVENT_ID);

    END LOOP;

    END;

    {code}

    The report query is:

    {code}

    Select...

    ......

    .......

    -case when current_activation_status = 'Not active' then

    "< a href =" f? p = & APP_ID.:122: & SESSION. Phase 1: "> click here < /a > '"

    Another null

    go to link,

    ....

    {code}

    Phase 1 is the name of the process. I think there may be an error in how I build the link. I build the query link, because there will be other cases that determine what process will run. That is when current_activation_status = 'active' and then '< a different link and process > '.

    So I figure that if I can do it in a "if - then" clause of an instruction box, so I can change it to accommodate several "if-then" clauses in the case statement.

    Also, should ASK = phase 1 in the status of the process?


    Thanks in advance. Let me know if you need more information.

    Just to clarify, by using a link + a request and do not put the page is a perfectly legitimate solution to this problem.

    If the above code is in the region of report source query you need not use the notation #COLUMN #. You can concatenate the string together. also, I made sure to escape from your simple tics. the clause is only to create a dummy sample put to test against

    with TEST_DATA as(
      select 'NOT ACTIVATED' CURRENT_ACTIVATION_STATUS , 1 INSPECTION_SECTOR_ID from DUAL union all
      select 'ACTIVATED', 2  from DUAL union all
      select 'ACTIVATED', 3  from DUAL union all
      select 'NOT ACTIVATED', 4  from DUAL
    )
    select case when current_activation_status = 'NOT ACTIVATED' then
    'Activate'
    else NULL
    end as link
    from test_data
    

    Good luck

    Tyson

  • How to use the entry that is provided in the form of report parameters and use it in a field to a report parameter.

    Hi, I'am, creating a new report, which is a combination of ' form_letter & tabular ' style.

    I also created a report with 2 inputs parameter, which is 'to_date' & 'from_date '.

    The value that will be inserted in 'to_date' & 'from_date' in the parameter_form, should be displayed in the report.

    So to do this, I created a field for 'to_date' & added the code for him in the pl/sql Editor.

    the code is as below:

    function boolean return F_TO_DATEFormatTrigger is

    date of f_to_date;

    Start

    f_to_date: =: PF_P_TO_DATE;  VALUE ASSIGNMENT (f_to_date) OF ENTRY OF PARAMETER the REPORT (PF_P_TO_DATE) FIELD.

    return (f_to_date);

    end;

    BUT I GET THE ERROR MESSAGE "THE FOLLOWING LINK VARIABLE IS NOT SET TO REP-0730: PF_P_TO_DATE.»

    I tried to decode the error, but I think that the problem is different. (The code above only works if "PF_P_TO_DATE" was part of the statement of the query, which is one of the columns of database, but PF_P_TO_DATE is a parameter). So can someone please help me with how can I take the value of input parameter and display it on the field in the report?

    Thank you.

    Hello

    Basically, you need to print the date two file - entry mark on your report.

    1. you get just two entry.

    2. in the layout - on header of page - Insert filed-> select source Frm_Date field.

    3. Repeat step 2 for the Date of filing.

    Now you should get that don't you need.

    If this isn't the case, work let me know the details.

  • Bulk Insert using databaselink in oracle 10 g (10.2)

    Bulk insert with data link gives an error like 'cannot insert null into the column primary code as follows
    ForAll i in < type name > such... < type name > .last
    insert into < table_name > name of @databaselink values...

    If I use the code throws above an error cannot insert null. But if I use the same collection with simple insert it works
    the code as follows

    I'm in < type name > such... < type name > .last
    loop
    Insert in the name of @databaselink values < table name >...
    end loop;
    It worked. ?!!!!!

    I was wondering what would be the solution and where it wasn't. Please throw some light on this
    Thanks in advance

    Bulk operations are used to minimize the change between PL/SQL and SQL context engines.
    For remote database operations, there is no context switching of each link DB must open a new connection.
    If you can ensure that your procedure @ distance DB only you can use the features in bulk collect.

    Thank you
    Fahad Aziz Khan

Maybe you are looking for

  • Cannot enable the Web Server (SSL) site on El Cap Server

    ' tLooking for help here, trying to put in place in El Cap 10.11.3/Server 5.0.15 Web services and the no - SSL server comes just in green in the admn, but the SSL server will not activate. I have an a record for the server to an external DNS server m

  • Nighthawk R7000 vs R8000

    I am looking for a new ac wireless router and want to know which of these models is the best. What are the advantages and disadvantages of each router?

  • Installation of "DEFAULT MAIL CLIENT" for / in Windows Internet Explorer

    Dear all, I tried to send an email by clicking on the name of a person on a Web site, but it appeared a message of Windows Internet Explorer, saying that 'default e-mail client' is not properly installed.  Could you please let me know in detail what

  • LaserJet Pro N1212NF MFP: N1212NF MFP Scanner offline

    Whenever I try to scan a document (with or without the help of the doc feeder, whatever), the printer/scanner disconnects 99 times out of 100, so it is impossible to use.  If I look at the screen "Devices and printers" in Windows, the printer icon fo

  • My laptop does not show my webcam under imaging devices or anywhere

    Original title: my laptop does not show my webcam under imaging devices or anywhere.  I was download the softeware and drivers and I don't know what happened to the webcam My daughter deleted files and scanned the computer and now I don't have a webc