PL/SQL with cursor for update another slider

Hi all

I'm doing the sub process... I just wrote this code for example... can someone give me idea how to
This... I have attached the error msg that I am below...

CREATE OR REPLACE PROCEDURE EMP_COMPARE
AS

CURSOR c_emp_err
IS
SELECT EMPNO IN EMP_ERR;

CURSOR c_emp_cur
IS
SELECT EMPNO, FRST_NAME, LAST_NAME
FROM EMP WHERE DEPTNO = 20;

BEGIN

FOR r_emp IN c_emp_cur
LOOP
IF r_emp. EMPNO NOT IN CHOICE - INCLUDING the EMP (c_emp_err) WHO are IN THE error TABLE
THEN
UPDATE EMP SET APPLY_DATE = SYSDATE
WHERE EMPNO = r_emp. EMPNO;
END IF;
END LOOP;

END;

ERR: PLS-00320: the declaration of the type of the expression is incomplete or incorrect

Thanks in advance...

Hello

I see.
My answer is always application: do not use the sliders if you don't have to. Looking for a way to do what you need to use only the SQL statements.

If you really not to use the two sliders, where some values in a come on the other, you can have nested cursors.
For example, the use of scott tables, you want to give a raise of 10% for all salaray everyone in any department based in a given city.
You may have two sliders:
(1) find each department based in the city of right
(2) find every employee in the Department of (1)

CREATE OR REPLACE PROCEDURE     slow_update
(     in_city_name     IN     VARCHAR2
)
AS
     CURSOR     dept_csr     (target_loc     VARCHAR2)
     IS     SELECT     deptno
          FROM     dept
          WHERE     loc     = UPPER (target_loc);

     CURSOR     emp_csr     (target_deptno     NUMBER)
     IS     SELECT     empno
          FROM     emp
          WHERE     deptno     = target_deptno;
BEGIN
     FOR     dept_rec IN dept_csr (in_city_name)
     LOOP
          FOR     emp_rec IN emp_csr (dept_rec.deptno)
          LOOP
               UPDATE     emp
               SET     sal     = sal * 1.1
               WHERE     empno     = emp_rec.empno;
          END LOOP;
     END LOOP;
END     slow_update;

Notice how I used parameters in the sliders.

You must perform the procedure as follows:

EXECUTE  slow_update ('Dallas');

Repeat: This is only for demonstration purposes.
The smart way to do such an UPDATE does not require the sliders or PL/SQL:

UPDATE     emp
SET     sal     = sal * 1.1
WHERE     deptno     IN     (
               SELECT     deptno
               FROM     dept
               WHERE     loc     = UPPER (:target_city_name)
               );

Tags: Database

Similar Questions

  • PL SQL program unit does not compile with cursor for UPDATE NOWAIT

    All,

    I am trying to use a cursor for UPDATE NOWAIT to avoid hung sessions on the shape of the front end.

    I am using a syntax such as:

    CURSOR my_cur (p_val)
    IS
    SELECT 1
    FROM my_table
    WHERE my_col = p_val
    FOR UPDATE NOWAIT.

    However, later in the procedure, when I try to refer to the cursor with the following syntax:
    (after opening/get the cursor...)

    UPDATE my_table
    SET my_col2 =: MY_BLOCK. FOO
    WHERE CURRENT OF my_cur;

    I get the following compilation error:
    Error 404 on line 140, column 30
    cursor 'MY_CUR' must be declared with to use with the CURRENT UPDATES OF

    The strange thing is that if I remove the "NOWAIT" keyword, the program unit compiles.

    If nothing else has noticed this? No workaround or patch solution? Is this a known bug?

    Thank you very much
    -Chris

    Try one

    FOR UPDATE OF ID NOWAIT;
    

    where ID is the name of a column in the table.

  • Restore to the point of backup with select for update

    I have I problem with my application I will try to post a simple test to demonstrate.
    The problem is that after rollack to backup session does not release lock if there is a sleep between.

    Here's a simple test case.
    create table t1 (a number);
    
    insert into t1 (a) values (1);
    
    commit;
    
    create or replace procedure xx_test_1 is
       dummy           number (1);
    begin
       savepoint mysavepoint1;
    
           select 0
             into dummy
             from t1
            where a = 1
       for update nowait;
    
       DBMS_LOCK.sleep (seconds => 10);
    
       rollback to mysavepoint1;
    end xx_test_1;
    
    create or replace procedure xx_test_2 is
    begin
       update t1
          set a = 2
        where a = 1;
    end;
    /
    In session 1 execute proc1.
    Session1 > exec xx_test_1;

    In session 2 perform procedure while the session 1 is "dormant".
    SESSION2 > exec xx_test_2;

    After some finite time of session and must release the lock on the record.
    But session 2 guard blocked by session 1.

    help apreciated.
    Thank you
    Miguel

    I don't think it's because you have a call to DBMS_LOCK. SLEEP. I think it's just a coincidence because it allows for enough time for you to launch a call for another session. Here's the relevant part of the SQL reference manual:

    Releases all table locks and line acquired from the point of backup. Other operations that have requested access to the lines locked once the save point must continue to wait until the transaction is committed or rolled back. Other operations who have not already requested the lines can request and immediately access lines.

    Source: ROLLBACK

  • Cursor for update

    I'm not familiar with the sliders, but I am developing one for an update. I want to update all the lines that I found in the first select statement with the values of the updta

    Declare
    CURSOR Inactiva_prod IS
    SELECT b.inventory_item_id, b.organization_id
    TO INV. MTL_SYSTEM_ITEMS_B b
    WHERE b.INVENTORY_ITEM_STATUS_CODE = 'Active '.
    AND segment1 (6)
    AND NOT EXISTS)
    SELECT DISTINCT Inventory_item_id
    OF inv.mtl_material_transactions
    WHERE the creation_date > TO_DATE('01/07/2009','DD/MM/YYYY')
    AND inventory_item_id = b.inventory_item_id
    *)*
    BEGIN
    FOR the INAC IN Inactiva_prod
    LOOP
    UPDATE mtl_system_items_b
    SET inventory_item_status_code = "inactive."
    bom_enabled_flag = 'n',
    customer_order_enabled_flag = 'n',
    customer_order_flag = 'n',
    internal_order_enabled_flag = 'n',
    internal_order_flag = 'n',
    last_update_date = SYSDATE,
    last_updated_by = 3606
    WHERE organization_id = b.organization_id
    AND inventory_item_id = b.inventory_item_id
    --
    -: SYSTEM. MESSAGE_LEVEL: = 5; -Zip los messages.
    commit;
    -: SYSTEM. MESSAGE_LEVEL: = 0; -Get los messages.
    END OF LOOP
    END;

    He gorge yourself me errors in lines 3,12,29

    ORA-06550: line 12, column 25:
    PL/SQL: ORA-00933: SQL not correctly completed command
    ORA-06550: line 3, column 5:
    PL/SQL: SQL statement ignored
    ORA-06550: line 31, column 5:
    PLS-00103: encountered the symbol "END" when expected in the following way:

    begin function package pragma procedure subtype type use
    < an ID > < a double quote delimited identifier > form
    current cursor

    4 numbers, should work now:

    Declare
    CURSOR Inactiva_prod IS
    SELECT b.inventory_item_id, b.organization_id
    FROM INV.MTL_SYSTEM_ITEMS_B b
    WHERE b.INVENTORY_ITEM_STATUS_CODE = 'Active'
    AND segment1 IN (6)
    AND NOT EXISTS (
    SELECT DISTINCT inventory_item_id
    FROM inv.mtl_material_transactions
    WHERE creation_date > TO_DATE('01/07/2009','DD/MM/YYYY')
    AND inventory_item_id = b.inventory_item_id
    );    ------------------------------------------------------ MISSING A SEMICOLON
    BEGIN
    FOR inac IN Inactiva_prod
    LOOP
    UPDATE mtl_system_items_b
    SET inventory_item_status_code = 'Inactive',
    bom_enabled_flag = 'N',
    customer_order_enabled_flag = 'N',
    customer_order_flag = 'N',
    internal_order_enabled_flag = 'N',
    internal_order_flag = 'N',
    last_update_date = SYSDATE,
    last_updated_by = 3606
    WHERE organization_id = inac.organization_id -----------------------------WRONG RECORD IDENTIFIER
    AND inventory_item_id = inac.inventory_item_id  -----------------------------WRONG RECORD IDENTIFIER
    --
    --:SYSTEM.MESSAGE_LEVEL := 5; -- Apaga los mensajes.
    commit;
    --:SYSTEM.MESSAGE_LEVEL := 0; -- Prende los mensajes.
    END LOOP;  ------------------------------------------------ MISSING A SEMICOLON
    END;
    

    And everything can be done with a simple update:

    UPDATE mtl_system_items_b
    SET inventory_item_status_code = 'Inactive',
    bom_enabled_flag = 'N',
    customer_order_enabled_flag = 'N',
    customer_order_flag = 'N',
    internal_order_enabled_flag = 'N',
    internal_order_flag = 'N',
    last_update_date = SYSDATE,
    last_updated_by = 3606
    WHERE (organization_id,inventory_item_id) IN (
             SELECT b.inventory_item_id, b.organization_id
             FROM INV.MTL_SYSTEM_ITEMS_B b
             WHERE b.INVENTORY_ITEM_STATUS_CODE = 'Active'
             AND segment1 IN (6)
             AND NOT EXISTS (
             SELECT DISTINCT inventory_item_id
             FROM inv.mtl_material_transactions
             WHERE creation_date > TO_DATE('01/07/2009','DD/MM/YYYY')
             AND inventory_item_id = b.inventory_item_id
    )
    

    Max
    http://oracleitalia.WordPress.com

    Published by: Massimo Ruocchio, February 12, 2010 17:10
    Adding simple updates.

  • How to replace "apply downloaded update now" with "Check for Updates" in the menu help when the update fails because the downloaded update files are missing but the "Ready to install update" window keeps appearing?

    Question

    I have another type of problem with Firefox

    Description

    Window "Ready to Install" Firefox "Software Update" appeared. The folder "C:\Program Files\Mozilla Firefox\updates\0" contained the files update.mar, update.status and update.version. Each of the 3 files have been deleted. The next time that Firefox has been started, no update occurred because update files were missing. In the Menu bar, clicking Help showed in the menu drop-down that "apply downloaded update now" was always on the list. By clicking on "Apply downloaded update now" open "Software Update" window "Ready to install update", so that Firefox still considers that the update files exist, but they do not. In the window "Software Update", by clicking on "Restart Firefox" restart of Firefox, but once again it there's no update, and remains "apply downloaded update now" on the Help menu. How can "Apply downloaded update now" be replaced by "Check for Updates" so the update files can be downloaded?

    Version of Firefox

    3.6.3

    Operating system

    Windows XP

    User Agent

    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; RV:1.9.2.3) Gecko/20100401 Firefox/3.6.3

    Plugins installed

    • npmnqmp - 989898989877
    • NP-mswmp
    • Adobe PDF plugin for Firefox and Netscape "9.3.2.
    • Default plugin
    • Foxit Reader plugin for Firefox and Netscape
    • Shockwave Flash 10.0 r45
    • Version 1.0.3 copyright 1996-2009 The VideoLAN Teamhttp: / /www.videolan.org/

    You can manually reset the software update feature by closing Firefox and remove the file "updates" (which seems you have done) and the two files "active - update.xml" and "updates.xml" - these are in the installation (C:\Program Files\Mozilla Firefox) directory or in the profile folder (C:\Documents and Settings\nom_utilisateur\Application Data\Mozilla\Firefox\Profiles\something.default).

    If it does not, see our KB article How to resolve the failure of the update of Firefox update error message - the section of 'last resort' can be useful, or or read this article from MozillaZine KB, software update.

    Please let us know how the above work, and if we can be of further assistance.

  • Select cursor for update: multiple columns of different tables

    Hello

    I have two tables test1 and test2. I want to udpate the column (DEPT_DSCR) from the TEST1 and TEST2 using select for update and current tables of the... with the cursor.

    I have a code drafted as follows:
    DECLARE
    v_mydept1 TEST1. TYPE % DEPT_CD;
    v_mydept2 TEST2. TYPE % DEPT_CD;
    CURSOR C1 IS SELECT TEST1. DEPT_CD, TEST2. DEPT_CD OF TEST1, TEST2 WHERE TEST1. DEPT_CD = TEST2. DEPT_CD AND TEST1. DEPT_CD IS 'AA' FOR THE UPDATE OF TEST1. DEPT_DSCR, TEST2. DEPT_DSCR;
    BEGIN
    OPEN C1;
    LOOP
    FETCH C1 INTO v_mydept1, v_mydept2;
    WHEN EXIT C1% NOTFOUND;
    UPDATE TEST1 SET DEPT_DSCR IS "PLSQL1" WHERE CURRENT OF C1;.
    SETTING A DAY TEST2 SET DEPT_DSCR = 'PLSQL2' WHERE CURRENT OF C1.
    END LOOP;
    COMMIT;
    END;

    The code above when it is run, declares that it runs successfully. But it does not update the columns you want [DEPT_DSCR].

    It works only when we want to update one or more columns of the same table... i. e by providing these columns after ' to UPDATE THE.
    I don't know what exactly is the problem when you want to update several columns of different tables.

    Can someone help me on this?

    user12944938 wrote:
    But it's more the notion of compensation and understanding.

    See the link below:
    http://download.Oracle.com/docs/CD/B10501_01/AppDev.920/a97269/pc_06sql.htm

    See the section RESTRICTION in the link above.

    Twinkle

  • call a script sql with one parameter of another

    I would like to call a sql script that takes a single parameter (& 1)... but it doesn't.
    It looks like (first.sql):
    begin
    for cv in (select table_name from all_tables where owner='IBIS') loop
            @my_script.sql cv.table_name;
    end loop;
    end;
    but when I run it, I got an error:
    @first.sql;
    old   9: spool &1..cob replace
    new   9: spool cv.table_name.cob replace
    old  10: select '       05 DBUFF-' || '&1' || '-1.' from dual;
    new  10: select '       05 DBUFF-' || 'cv.table_name' || '-1.' from dual;
    old  12: from all_tab_cols where table_name='&1' and substr(column_name,1,3)<>'SYS';
    new  12: from all_tab_cols where table_name='cv.table_name' and substr(column_name,1,3)<>'SYS';
    old  13: select '          05 ' || '&1' || '-ROWID          PIC X(18).' from dual;
    new  13: select '          05 ' || 'cv.table_name' || '-ROWID          PIC X(18).' from dual;
    What is missing?

    Kind regards...

    Hello

    The trick is to generate a sql script with all your calls to internal scripts and their parameters.

    For example, my script is internal countTableIndex.sql :

    select 'Table &1 has got '||count(*)||' indexes.' from user_indexes where table_name='&1';
    

    And here's my script outside coutnIndex.sql :

    set serverout on pages 0 lines 100 feed off time off verify off define on tab off trimspool on trimout on termout on termout off
    spool cmd.sql
    begin
    for cur in (select table_name tab from user_tables) loop
         dbms_output.put_line('@countTableIndexes.sql '||cur.tab);
         null;
    end loop;
    end;
    /
    spool off
    set termout on
    @cmd.sql
    exit;
    

    As you can see, it generates a file cmd.sql containing internal script calls and ultimately calls the script cmd.sql.
    In my example schema scott after the execution, the cmd.sql file contains:

    @countTableIndexes.sql DEPT
    @countTableIndexes.sql EMP
    @countTableIndexes.sql BONUS
    @countTableIndexes.sql SALGRADE
    @countTableIndexes.sql TOTO
    

    Here is the result of my machine:

    [oracle@Nicosa-oel test19_parameterizedSqlScripts]$ sqlplus -s scott/tiger@my11g @countIndex.sql
    Table DEPT has got 1 indexes.
    Table EMP has got 1 indexes.
    Table BONUS has got 0 indexes.
    Table SALGRADE has got 0 indexes.
    Table TOTO has got 0 indexes.
    
  • Error 1400 with "Check for Updates".

    Problems when choosing "Check for Updates" on any version of Adobe Acrobat or Reader.  The actual messages reads "cannot establish a connection. Please try again later. "Error: 1400.

    Updaters worked from this past Friday afternoon, but nothing now.

    Hello

    I think we have found the cause of this problem and solved.

    I hope you find it should work now.

    Henk

  • Run the report to PL/SQL with the branch to another page

    I have an application which, at various times, I run a PL/SQL procedure to perform an action, and then we must run a report while also navigating away from the current page. The actions are performed on a button click.

    I tried several methods, but for the life of me cannot get the system to do the two things (ie. run the report and the direction to another page). I tried to put in page 0 (to be executed after the treatment on the click of a button) a branch with a request line to print the report, followed by a branch to the other page (also to run after the treatment on the button click) - and only the branch page 0 runs in fact. Also tried a branch to the other page only, with the print in the request parameter request - but only runs the report, do not create a branch to the other page.

    I also tried to put the call to run the report in the PL/SQL code, using utl_http.start_request (url), but that came with a "Bad Request" error. Also tried to use the owa_util.redirect_url call, but also no chance.

    I'm pulling my hair out at this time, especially because I am under pressure to get the system in very short time.

    Any suggestion would be appreciated.

    You can run queries report of their URL (f? p = & APP_ID.: 0: & SESSION.: PRINT_REPORT =)

    So one approach would be to
    The button click, call a JS function which

  • 1 use the Ondemand/recall process in order to perform the processing workflow (file selection box)
  • 2 open the report in a popup (from your IR page)
  • 3 redirect leaves the IR page to another page?
    ------
    Another approach:
  • 1. IR report submits the page
  • 2. in the PLSQL block, you do the treatment
  • 3. the branch redirects to a URL that would point to the report URL.
    OR
  • 3. do you have a JS onload which runs only when demand is demand for BUTTON and opens a page that points to the report.
    ------

    Still another way is to use htp.p in PLSQL block which made the treatment of workflow
    So your code PLSQL

    BEGIN
      --Do the workflow processing here
      --End workflow processing
      htp.p('');
    END;
    
  • Problem with pages for update for Sierra

    My document freezes and the sidebar opens with a message that says "choose anything...". Select an object or text in the format"- it does every few minutes, and he has not done that before the Sierra. Does anyone know how to make this stop?

    N °

    With no idea what version of Pages you're talking about.

    Peter

  • CURSOR for loops or an associative array

    I just want to know the advantages and disadvantages of the CURSOR for loops. As a general rule, what guys do you prefer: associative array with CURSOR for loops?


    If you use the CURSOR for loop, is it not difficult to debug?

    PL/SQL Developer, I do not see what values are stored in the CURSOR for loop (in SP master_proc below) as
    There are no variables to watch. Not sure if the TOAD can show these values

    If I had used an associative array (master_proc2 below), I can see the values stored in the table by clicking on "show Collection"variable in PL/SQL developer.




    create table emp2 as select * from emp;
    
    
    create or replace procedure my_proc(p_empno in number)
    as
    begin
    update emp2 set sal=sal+100 where empno=p_empno;
    end;
    /
    
    --Using CURSOR FOR loop
    
    create or replace procedure master_proc
    as
    begin
         for rec in (select empno from emp2 where empno>7700)
         loop
              my_proc (rec.empno);
         end loop;
    end;
    /
    
    -- Using Associative arrays
    create or replace procedure master_proc2
    as
    type v_empno_type is table of number index by pls_integer;
    v_empno v_empno_type;
    
    begin
    select empno bulk collect into v_empno from emp2 where empno>7700;
    
    for i in 1..v_empno.count
     loop
        my_proc (v_empno(i));
     end loop;
    end;
    /

    VitaminD wrote:
    Thank you Tubby. If you are faced with a situation where you MUST use a loop. Then you would go to associative arrays rather than CURSOR FOR loops. Right?

    Doesn't happen too often, but if/when then I would do as I said in my first post. Use the transformation, the collection table in BULK and FORALLs.

    If we use your example posted, I would NOT spend a single table (in a loop mode) value I would be transmitted in the OVERALL picture and treat it with FORALL.

    So, I would still use neither of the approaches that you mentioned.

  • What is happening with Windows Update you will need to install a new update to check for updates?

    What is happening with Windows Update from 18/01/2016 When I find out Windows Update in Control Panel, he said, with a big yellow sign warning, "install new Windows Update software to check updates. You must first install an update from Windows Update. Your automatic update settings will not change. To install the updated Windows Update will automatically close and reopen. »

    Only Microsoft would think of this UPDATE TO SEE THE UPDATE.

    When you click on install, it starts running AND running and checking for updates and there is no display. It must be download them?

    When I go to shut down the computer, there is a big yellow exclamation on the Start button that says that Windows Update will install updates before its stop point. So it takes a while to stop.

    I also noticed that in Windows Task Manager > process I have an iexplore.exe process * 32 running 120, 600 KB.

    It stopped when I changed the Windows Update option stop the download and installation.

    The computer is running very slow and erratic.

    I just reinstalled Windows 7, so I have to do all the updates.

    Does anyone have the same problem?

    Thank you

    TomS

    Yep, that's how M$ slides 10ware in

    See the note at the bottom of the updates settings page ;)

    M$ has abused more than system update in 2015 and that continues in 2016.

    I usually don't worry about this if updates are they come if not well welcome to 2020 support ended in the beginning

    Do not use Internet Explore / MSE / Windows Firewall / Windows defender

    Find alternatives for all of the foregoing

    Free Panda who has a firewall

    Premium not free malwarebytes, but it has a free version

    Superaitispyware pro, which also has a free version

    Moon pale x 64 bit is quite good with Firefox.

    In the end, you can use a standard account instead of an administrator account and be safer.

    You can still enter a password if you are prompted to run the items that you know are safe.

    Well how did Linux a user to enter a password to do most of the tasks = kind of annoying if: p

    Let junkware M$ at the door, you will be much safer any square meter said ;)

  • Problem with cursor Max for the PLSQL called by OAF Page

    All,

    We developed a custom and Self Service OFA this page page, we call PLSQL package to validate and insert the data into the database tables. It worked well, but when we deployed this form throughout the Organization (meaning more users), we reach the limits of MAX cursor for a session.

    This for allows Manager to update all their coordinated under, so in a session, a Manager may work on more than one employee so reach the limit of MAX cursor.

    Please help on how we can solve this problem, I checked all of the cursors used in the PLSQL package are closed properly.

    Ex PLSQL Call:

    String createRow = null;

    try {}

    OADBTransaction oadbtransaction = (OADBTransaction) pageContext.getApplicationModule (webBean) .getTransaction ();

    java.sql.Connection connection = oadbtransaction.getJdbcConnection ();

    CallableStatement callablestatement = oadbtransaction.createCallableStatement ("start: 1: = xxx_hr_multiple_rates_pkg.is_create_job_row (pc_job_name = >: 2);") end; ", 1);

    callablestatement.setString (2, primaryJob.getText (pageContext));

    callablestatement.registerOutParameter(1,Types.VARCHAR);

    CallableStatement.Execute ();

    createRow = callablestatement.getString (1);

    String [] retVals = am.invokeMethod ("createWFMJob", parameter1) (String []);

    System.out.println("CreateRow:"+CreateRow);

    CallableStatement.Close ();

    }

    catch (Exception e) {}

    e.printStackTrace ();

    pageContext.writeDiagnostics (this, try (), 1);

    }

    Thank you

    A

    Ankit,

    Please attach your PL/SQL code, so that we can have a look that the issue could be in that.

    In addition,

    Why do you call the code inside this test below? What is the link?

    String [] retVals = am.invokeMethod ("createWFMJob", parameter1) (String []);

    Why do you need the code below? Delete this.

    java.sql.Connection connection = oadbtransaction.getJdbcConnection ();

    Move the callablestatement.close ();  outside of try catch.

    See the link, if you need some examples below:

    Advice from the Oracle Johny: OAF: sample code to call the function PL/SQL of OA Framework

    See you soon

    AJ

  • Access to SQL issues for updating a numeric field

    Hello world. I have a publishing page that updates some fields in a database. We just converted all access to SQL. I can update the page very well for the most part, except when I try to update the number of sales for a reason any. I don't know why. I think it has something to do with the SQL database, but I don't know what. The field is called Sales_Order_Number. When I try to enter a number in this field, I get a 500 internal server error. Here's my query I use to display information. on the action page, as well as the update of the table.

    We have also updated our MX7 ColdFusion to 11. Not sure if this would make a difference or not otherwise. Can someone please? Thank you.

    Andy

    < CFQUERY NAME = "ShowContact" Datasource = "#application. DataSource #">"

    SELECT the company Company_Name, Middle, First_Name, Last_Name.

    ContactID, Contact_Num, ItemID, Item_Num, RFQID, RFQID_SPEC, Entry_Date

    Of

    (((Contacte LEFT JOIN RFQ_Numbers ON Contacts.ContactID = RFQ_Numbers.Contact_Num))

    ON Contacts.Company = Companies.Company_Name LEFT JOIN companies)

    LEFT JOIN RFQ_SPEC ON RFQ_Numbers.RFQID = RFQ_SPEC. RFQID_SPEC)

    Where ItemID = #form. ItemID #.

    <!- and Contacts.RFQ_Num > = 0->

    ORDER BY ItemID

    < / CFQUERY >

    < cfset Form.RFQ_Expected_Value = ReReplace(Form.RFQ_Expected_Value,"[$,abcdefghijklmnopqrstuvwxyz]","","All") >

    < cfquery Datasource = '#application. DataSource #">"

    Update RFQ_SPEC

    The value <!-< cfif IS Entry_Date ' "> Entry_Date = Null,". "

    < cfelse > Entry_Date ='#form. Entry_Date #', < / cfif >->

    M2M_Quote_Number = < cfif isDefined "(form. M2M_Quote_Number') and #form. NEQ M2M_Quote_Number #.

    «"> ' #form.» M2M_Quote_Number #'.

    < cfelse >

    NULL,

    < / cfif >

    Rev ='#form. Rev #',

    Standard_Part_Number ='#form. Standard_Part_Number #'.

    Generic_Description ='#form. Generic_Description #'.

    <!-< CFIF IsDefined ("form. GHz_Socket") > = GHz_Socket

    #form. GHz_Socket #, < / CFIF >->

    Received_By ='#form. Received_By_Initials #'.

    Assigned_By ='#form. Assigned_By_Initials #'.

    RFQ_Leader ='#form. RFQ_Leader_Initials #'.

    Jsquad_Coordinator ='#form. Jsquad_Initials #'.

    < cfif IS Complete_Date ' "> Complete_Date = Null,". "

    < cfelse > Complete_Date =' #form.Complete_Date #', < / cfif >

    Highest_Quantity_Request = < cfif isDefined "(form. Highest_Quantity_Request') and

    #form. NEQ Highest_Quantity_Request #.

    "" > "".

    ' #form. Highest_Quantity_Request #'.

    < cfelse >

    NULL,

    < / cfif >

    < cfif IS New_Custom_PO_Received_Date ' "> New_Custom_PO_Received_Date = Null,". "

    < cfelse > New_Custom_PO_Received_Date ='#form. New_Custom_PO_Received_Date #', < / cfif >

    Sales_Order_Number = < cfif isDefined "(form. Sales_Order_Number') and

    #form. NEQ Sales_Order_Number #.

    «"> ' #form.» Sales_Order_Number #'.

    < cfelse >

    NULL,

    < / cfif >

    < IsDefined ("form. CFIF Order_Request") > = Order_Request

    #form. Order_Request #, < / CFIF >

    Customer_Reason_Rejecting ='#form. Customer_Reason_Rejecting #'.

    Budgetary_Quote ='#form. Budgetary_Quote #'.

    RFQ_Expected_Value = < cfif isDefined "(form. RFQ_Expected_Value') and #form. NEQ RFQ_Expected_Value #.

    «"> ' #form.» RFQ_Expected_Value #'.

    < cfelse >

    NULL,

    < / cfif >

    Possible_Status ='#form. Possible_Order #'.

    <!-code as if a Sales Order Number is entered, then the State of sales field is registered as 'ordered '. If the Sales Order Number field is empty, then the field sales status will be entered regardless of the drop-down menu has been chosen item.

    ->

    < cfif Sales_Order_Number IS not "" > Sales_Status = "ORDERED", "."

    < cfelseif IS Sales_Order_Number ' "> Sales_Status ='#form." " Sales_Options #'.

    < / cfif >

    Additional_Comments ='#form. Additional_Comments #'.

    End_Customer_Name ='#form. "End_Customer_Name #

    Where ItemID = #form. ItemID #.

    < / cfquery >

    ALEXANDER,

    Thanks, but what I discovered is that I had to change the entry for the word ordered in single quotes instead of double quotes, so the if statement now reads like this:

    Sales_Status = "ordered."

    Sales_Status ='#form. Sales_Options #'.

    Thanks again.

  • Question about the update of a cursor for loop

    Hi, please someone could help with the following:

    I have a simple script below:

    declare

    cursor c1 is select name, salary of employers;


    Start

    for rec loop c1

    dbms_output.put_line ('employee' |) Rec.Name | ' s former salary was £' | Rec.salary);

    update of employers set salary = salary * 1.2 where name = rec.name;


    dbms_output.put_line ('employee' |) Rec.Name | "new treatment is £' | Rec.salary);

    end loop;

    end;

    This gives me the old value of the salary, but the output for the new salary remains the same, that is to say, it has not increased by 1.2.

    Ive tried to run in the 2 loops that works, but does not give me in order I want, IE employers followed old sal nine.

    Ive tried to add is committed and various other things, but it makes no difference. I thought that the script above should work. Where I'm going wrong?

    Thank you very much

    882839 wrote:

    I learned (perhaps wrongly) that cursor for loops were good practice. Is it not the case?

    Could you mention who told you this?

    I'm curious because on a daily basis in almost all the sons of my treatment is slow , the reason for the slow transformation is the loop and all responses point out that you are using a loop ensures that the process is running more slowly as possible.

    But despite any response in this community saying loops are the worst practices, every day more people come here apparently having learned exactly the opposite and then wonder why their program runs like a dog three legs with an anchor attached to his tail.

Maybe you are looking for

  • How to open Zip downloaded from firefox in the android platform

    as above. I downloaded a file on the net via a link and its an ebook in ZIP format. The android version of Firefox refuses to allow me to do anything with it

  • There is an unknown element in my list of "Login Items"

    Hello While checking my "Login Items" list, I noticed that there is an entry that is tagged as 'unknown '. His name is 'apple -'. Could someone help me please to find out what it is? Is it necessary? If this is not the case, how can I remove it? Why

  • LV feature? Editing a list of cases with ellipsis...

    Very trivial question (I think), but for some reason, I couldn't understand it help. I'm suspecting a candidate of CAR... I have a switch case structure is connected to an enumerated control. One of the schemes being common to several of the enumerat

  • audio and flash attack on XP

    I have Windows XP and was hit with a malware that plays ads and other audio without my even be connected to one of our user ID specific once the system is turned on. When kept error messages stuck system deleted all the adobe and tried to reload them

  • invoke browser

    Hello I try to call from a webworks app browser and its does not work and I can't find my mistake: looks like a link: var html = ''+title+''+desc+' '; the JavaScript function: I've changed for the test: function openBrowser(url) { var args = new blac