PLS-00363: expression cannot be used as a target of assignment

Hello

Oralce9.2

When I run the insertion process I get the below error:

Procedure
--------------

PROCEDURE proc_one_insert (col1 IN digital OUT,
col2 IN num,
numeric IN COL3
);

BEGIN
immediately run proc_one_insert (2,1,111);
END;
/


Error
------

PLS-00363: expression '2' cannot be used as a target of assignment


How to solve the error above?


Regarding

Published by: user640001 on December 2, 2010 03:04

Example is already there... Recheck the post... v1 is the variable used for the IN OUT parameter.

Concerning
Arun

Tags: Database

Similar Questions

  • Error 00363: '10' Expression cannot be used as a target of assignment

    / * I want to write a basic procedure with the IN OUT parameter, which asks to enter 'and not' and then print the Total wages of this department number. Same parameter must be used in the
    -application of value and
    -value of print


    create or replace
    procedure p_test (dptno number)
    is
    number of Temp;
    Start
    Select sum (sal) in temp from emp where deptno = dptno;
    dbms_output.put_line (' sum is wages to the Department is ' | temp); / * This works can and I get the result. But I want to get the result by using 'dptno' only.*.
    dptno: = temp;
    dbms_output.put_line (' sum is wages to the Department is ' | dptno); / * Here I am trying to get the result using "dptno". According to the argument passed requirement must return only data * /.
    end;


    I'm under procedure to SQL Prompt with which follows:
    exec (& Depart_no)

    Published by: user11176339 on February 25, 2013 22:53

    Hello

    can we do even via the EXEC command as well?

    No, EXEC is simply the abbreviation of BEGIN END;
    because you must declare a variable for the parameter out you cannot use it.

    Concerning
    Marcus

  • PLS-00231 - function cannot be used in SQL

    Morning you all,.

    Please, don't ask me not to do this kind of function, because I cut the pieces that are not important information to my question. Thank you.

    Package:

    function PL_Fun)

    P_COD1 IN VARCHAR2,

    P_COD2 NUMBER,

    P_COD3 NUMBER) RETURN VARCHAR2;

    PROCEDURE PL_Prod (P_CURSOR1 ON C_RETURN);

    Package body:


    Function PL_Fun)

    P_COD1 IN VARCHAR2,

    P_COD2 NUMBER,

    P_COD3 NUMBER) RETURN VARCHAR2 AS

    SALIDA VARCHAR2 (3000);

    BEGIN

    Salida: ='XXXXX1; YYYYY1; S |

    XXXXX2; YYYYY2; S |

    XXXXX3; YYYYY3; S |

    XXXXX41; YYYYY4; S |' ;

    RETURN of SALIDA;

    END PL_FUN;

    PROCEDURE PL_Prod (P_CURSOR1 ON C_RETURN) IS

    nothing exceptional;

    V_CODERROR VARCHAR2 (3);

    V_DESERROR varchar2 (300);

    BEGIN

    OPEN FOR P_CURSOR1

    SELECT PL_Fun (table1.v_cod1, )

                                           table1.v_cod2,

                                           table1.v_cod3) as description

    FROM TABLE1;

    EXCEPTION

    When is nothing THEN

    V_CODERROR: = '001';

    V_DESERROR: = 'nothing. '

    RAISE_APPLICATION_ERROR (-20000

    V_CODERROR | ':' || V_DESERROR

    );

    WHILE OTHERS THEN

    V_CODERROR: = 'SQL ';

    V_DESERROR: =.

    «ERROR ON PL_Fun (' |)» SQLCODE. ') ' || SUBSTR (SQLERRM

    1

    300

    );

    RAISE_APPLICATION_ERROR (-20000

    V_CODERROR | ':' || V_DESERROR);

    END PL_Prod;

    Error:

    Error: PLS-00231: function 'PL_Fun' is not usable in SQL

    Text:, PL_Fun (P_COD_1, P_COD_2, P_COD_3) as description

    Error: PL/SQL: ORA-00904: invalid identifier

    Text:, PL_Fun (P_COD_1, P_COD_2, P_COD_3) as description

    Error: PLS-00323: subprogram or cursor "PL_Fun" is declared in a package specification and must be defined in the package body

    Text :);

    What I'm trying?

    Like ask Tom reffers, I changed the position of the packet body,

    From:

    Function PL_Fun ();

    PROCEDURE PL_Prod;

    TO:

    PROCEDURE PL_Prod;

    Function PL_Fun ();


    But it did not work. I have the same problem.


    And, as I read on another forum, I used the PRAGMA RESTRICT_REFERENCES like the following, but it doesn't work either:

    CREATING a PACKAGE LIKE xxxx

    Function PL_Fun)

    P_COD1 IN VARCHAR2,

    P_COD2 NUMBER,

    P_COD3 NUMBER) RETURN VARCHAR2;

    RESTRICT_REFERENCES PRAGMA (PL_Fun, WNDS, WNPS);

    PROCEDURE PL_Prod (P_CURSOR1 ON C_RETURN);

    END xxxx;



    Any suggestions?


    Thank you guys.

    Finally... solved. Break for a cup of coffee and lunch... and there's the problem: the function parameters where the same is called not on the statement and the area of the body area. The problem was just a letter. However, none of us (team work) noticed.

    Sorry for that and I THANK YOU all for your patience.

  • Error PLS-00363

    Hello

    I have created a package, but compiling, I got pls-00363
    create or replace package OSAPI_NI as
    procedure my_proc(SID number, cod_prefix varchar2, numar varchar2);
    end OSAPI_NI;
    /
    show errors package OSAPI_NI;
    
    CREATE OR REPLACE PACKAGE BODY OSAPI_NI as
          procedure my_proc(SID number, cod_prefix varchar2, numar varchar2) is
          begin
            SID := null;
            cod_prefix := null;
            numar := null;
          end;
    end OSAPI_NI;
    LINE/COL ERROR
    -------- -------------------------------------------------------------------------
    4/5 PLS-00363: expression 'SID' can not be used as a target of assignment
    4/5 PL/SQL: statement ignored
    5/5 PLS-00363: expression 'COD_PREFIX' cannot be used as a target of assignment
    5/5 PL/SQL: statement ignored
    6/5 PLS-00363: expression "NUMAR" cannot be used as a target of assignment
    6/5 PL/SQL: statement ignored

    Why those who can not be null? This package is just for test...

    Thank you!

    Given that you do not specify the mode of the three parameters of my_proc procedure, Oracle takes the default value, which is in. You will need to define as OUT.

    CREATE OR REPLACE PACKAGE BODY OSAPI_NI as
          procedure my_proc(SID OUT number, cod_prefix OUT varchar2, numar OUT varchar2) is
          begin
            SID := null;
            cod_prefix := null;
            numar := null;
          end;
    end OSAPI_NI;
    
  • Error (120,9): PLS-00363:

    Hello guys,.


    I am facing an error while passing an out* parameter in a procedure call.

    the error is:

    Error (120,9): PLS-00363: expression '< expression >' cannot serve a purpose of assignment

    and the code is:
    create or replace
    PROCEDURE usp_abc
    (
    v_pct in number  ,    
     v_pVt in number  ,
    vr_payagainst ,
    vr_Todate
    ) 
    as 
    begin
    ---
    ---
    ----
    -------
    usp_xyz (
            v_pTrantype=>vr_payagainst,
            v_pTrandate=>vr_Todate,
            v_pcd=>v_pct,
            v_pVd=>v_pVt,   
            *v_pLedgerID=>null*,-----------------> the  line generating error
            )
    ----
    ---
    -----
    ---------
    end;
    the v_pLedgerID parameter in the usp_xyz procedure has been defined as

    v_pLedgerID OUT NUMBER


    could someone help me fix this bug...


    Thank you very much

    Try something in the sense of:

    create or replace
    PROCEDURE usp_abc
    (
    v_pct in number  ,
     v_pVt in number  ,
    vr_payagainst ,
    vr_Todate
    )
    as
      l_pLedgerID number;
    begin
    ---
    ---
    ----
    -------
    usp_xyz (
            v_pTrantype,
            v_pTrandate,
            v_pcd,
            v_pVd,
            l_pLedgerID
            )
    ----
    ---
    -----
    ---------
    end;
    

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:325417134618

  • PLS-00363

    During the compilation of new package I get error in this statement:

    BEGIN
    l_STATUS: = 1;

    SELECT NULL FROM EM_DA MODEL. OE62_INFO

    WHERE p_ch_message_code_i IN ('0001 ', ' 0002')
    AND IZD = p_ch_izda_i
    AND FR = p_ch_eno_i
    AND PR = p_ch_pr_class_i
    AND KL = p_ch_kl_id_i;
    l_STATUS: = 3;

    EXCEPTION WHEN NO_DATA_FOUND THEN NULL;
    END;

    ERROR: PLS-00363: expression 'l_STATUS' cannot serve a purpose of assignment
    ..................

    The settings in the package body are reported;

    VARCHAR2 DUMMY,
    l_status VARCHAR2)

    Any help will be apreciated.

    Kind regards
    Robert

    Published by: user8660054 on 31.8.2010 04:19

    Or declare the parameter as an OUT parameter.

  • PLS-00435: without LINKING DML statement to BULK cannot be used

    My requirement

    I dynamically create a staging table my_stg and then fill it out. Seems simple, but do not know why I get this error

    create table gtest4 (myid varchar2 (10), mykey varchar2 (10));


    create table gtest5 (myid varchar2 (10), mykey varchar2 (10));

    insert into gtest4 values (1.3);


    insert into gtest4 values (2.7);

    insert into gtest5 values (5,3);

    insert into gtest5 values (1, 7);

    commit;


    / * Formatted on 2012/01/27 17:52 (trainer more v4.8.8) * /.
    CREATE OR REPLACE PROCEDURE px
    IS
    RecType (RECORD IS of TYPE)
    MyID VARCHAR2 (100),
    MyKey VARCHAR2 (100)
    );

    TYPE tabtype IS rectype TABLE
    INDEX OF DIRECTORY;

    REC tabtype;
    News sys_refcursor;
    BEGIN
    EXECUTE IMMEDIATE ' create table my_stg (myid varchar2 (100), mykey varchar2 (100)) ';

    Heart OPEN FOR "select a.myid, b.mykey
    gtest4 a, gtest5 b
    where a.mykey = b.mykey';

    LOOP
    News FETCH
    COLLECTING LOOSE rec LIMIT 500;

    FORALL I IN 1... recomm. COUNTY
    EXECUTE IMMEDIATE "insert into my_stg (myid, mykey) values (rec (i) .myid,
    Rec (i). MyKey)';
    OUTPUT WHEN heart % NOTFOUND;
    END LOOP;
    END;
    /


    I compile the above proc and get

    PLS-00435: without LINKING DML statement to BULK cannot be used

    the reason why I put in run is immediate because the my_stg table does not exist, it is created on the fly

    Maybe

    INSERT INTO my_stg (myid, mykey, id_seq)
    VALUES (rec1(i), rec2(i). sequence.nextval);
    

    Concerning

    Etbin

  • Outlook express cannot delete messages in the Inbox

    my outlook express cannot delete messages in the Inbox. After that, click on Delete on any e-mail item, nothing happens.

    You are the very welcome, but please take into account preventive advice.
     

    Do not archive mail in the receipt or sent items box.  Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.

    Information on the maximum size of the .dbx files that are used by Outlook Express:
    http://support.Microsoft.com/?kbid=903095

    After you're done, followed by compacting your folders manually while working * off * and do it often.

    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.

  • •with outlook express cannot receive or send e mails

    • using outlook express cannot receive or send e mails
    Error number: 0x800C0133 = a corrupt Inbox.
     
    Move any message you want to save to a local folder that you create. Then, remove the problem of Inbox as follows.
     
    Tools | Options | Maintenance | Store folder will reveal the location of your Outlook Express files. Note the location and navigate on it in Explorer Windows or, copy and paste in start | Run.
     
    In Windows XP, Win2K & Win2K3 the OE user files (DBX and WAB) are by default marked as hidden. To view these files in Windows Explorer, you must enable Show hidden files and folders under start | Control Panel | Folder options | View.
     
    With OE closed, find the box of Inbox.dbx and delete it. Another will be created automatically when you open OE.
     
    General precautions for Outlook Express:
     
    Do not archive mail in the receipt or sent items box. Create your own user-defined folders and move messages you want to put in them. Empty the deleted items folder daily. Although the dbx files have a theoretical capacity of 2 GB, I recommend all a 300 MB max for less risk of corruption.
     
    After you're done, followed by compacting your folders manually while working * off * and do it often.
     
    Click Outlook Express at the top of the the folder tree so no folders are open. Then: File | Work offline (or double-click on work online in the status bar). File | Folder | Compact all folders. Don't touch anything until the compacting is completed.
     
    Disable analysis in your e-mail anti-virus program. It is a redundant layer of protection that devours the processors and causes a multitude of problems such as time-outs and account setting changes. Your up-to-date A / V program will continue to protect you sufficiently. For more information, see:
    http://www.oehelp.com/OETips.aspx#3
  • All of a sudden Outlook Express cannot find the files created by the method of attachment.

    Outlook Express cannot find the newly created files to attach. The files are there in My Documents and Outlook Express can still see all the old files, but each new file for the last month is not seen and cannot be attached. I even typed in the name of the file and it says can not find the file of the same name. I send you the files now through 'Send it' a service online, but complicated to use another program. I checked the 'views' and they seem ok. Help, please!

    It is a long shot, but try it in a new identity.

    File | Identity | Add the new identity. Create a new one and try it. If all goes well, you can import your messages and address book from the old identity and delete it.

    Note: Do not use the main word in the name of the new identity.

    How to create and use identities in Outlook Express
    http://support.Microsoft.com/?kbid=209169

    Bruce Hagen ~ MS - MVP [Mail]

  • The activation server determined that the specified product key cannot be used.

    (windows 7 Professional) product key, I get from MSDN, through my college
    the key has been used first in my office and I've activated, it
    later, I formatted my desktop computer and install w7 in my laptop with the above product key
    so I find the product key will be impossible to activate windows

    Here are the details of the error:
    ---------------------------
    Error details
    ---------------------------
    The following information was found for this error:

    Code:

    0xC004C008

    Description:

    The activation server determined that the specified product key cannot be used.

    ---------------------------
    Ok
    ---------------------------

    pls help >
    THX in advance

    Hello

    Since you have already activated this product key, the server displays the key as being in use. Simply call the Activation Center and activate manually settle.

    1. press the Windows Logo key + R. This will bring up the run dialog box.

    2. in the Open: box, type slui 4 and press OK. This starts the manual activation wizard.

    3 select your country from the drop down and click Next.

    4. the wizard displays a toll-free telephone number. Leave the wizard open on the computer and call this phone number.

    You will receive a few saved options. Select the option to speak to a representative.

    The representative will manually activate this system for you.

    Let us know if you mhave more problems

    Ronnie Vernon MVP

  • On Windows 7 get the error message "the product key you entered cannot be used to activate Windows on this computer."

    Hi, I have original windows7 and I tried to reinstall, but have a problem. When I try to activate I get a message "the product key you entered cannot be used to activate Windows on this computer. pls help me...

    Product ID: 004626-068-2570142-86162

    The ID of the product - 068 - indicates a not for resale MSDN account. If you are not the account holder and you bought it in a box at retail, the box and its contents is counterfeit. Request an immediate refund from the seller

    For more information, see this:

    http://social.Microsoft.com/forums/en-us/genuinewindows7/thread/a2444f34-0AFF-4f29-a8ac-67e28b0c0285

    And this:

    http://social.Microsoft.com/forums/en-us/genuinewindows7/thread/309bb621-92d5-43d6-98c1-2bb51b35607f

    To see how these counterfeits are more, see:

    http://www.YouTube.com/watch?v=hzqNNiOM0cs

    You can buy a legitimate windows from a legitimate retailer.

  • PLS-00382: expression is of the wrong type

    Hello

    PL/SQL code
    CREATE OR REPLACE TYPE prof_ctab_value_rec_t AS OBJECT (
      prof_id         INTEGER
     ,ctabv_id        INTEGER
     ,ctab_id         INTEGER
    )
    
    
    CREATE OR REPLACE TYPE prof_ctab_value_table_t IS TABLE OF prof_ctab_value_rec_t
    
    
    
    FUNCTION get_prof_ctab_value
    
    RETURN prof_ctab_value_table_t PIPELINED
    IS
    
      v_sql          VARCHAR2(4000);
      v_cursor       SYS_REFCURSOR;
      v_result_set   prof_ctab_value_table_t;
    
    
    BEGIN
    
       v_sql := 'select .....';
    
      EXECUTE IMMEDIATE v_sql USING
      OUT v_cursor;
          
        LOOP
        FETCH v_cursor INTO v_result_set;
        EXIT WHEN v_cursor%NOTFOUND;
        PIPE ROW(v_result_set);
    
        END LOOP;
    
    
    END;
    Compile errors


    Error: PLS-00382: expression is of the wrong type
    Text: PIPE ROW (v_result_set);

    Error: PL/SQL: statement ignored
    Text: PIPE ROW (v_result_set);

    Please tell me wht causes the compile error. Thanks in advance.

    I don't know what you're trying to do... Probably, this will help you...

    SQL> create or replace FUNCTION get_prof_ctab_value
      2  RETURN prof_ctab_value_table_t PIPELINED
      3  IS
      4    v_sql          VARCHAR2(4000);
      5    v_cursor       SYS_REFCURSOR;
      6    v_result_set   prof_ctab_value_rec_t :=
      7                prof_ctab_value_rec_t(null,null,null);
      8  BEGIN
      9     v_sql := 'select 1,2,3 from dual union all select 4,5,6 from dual';
     10    open  v_cursor for v_sql;
     11      LOOP
     12      FETCH v_cursor INTO
     13     v_result_set.prof_id,
     14     v_result_set.ctabv_id,
     15     v_result_set.ctab_id;
     16      EXIT WHEN v_cursor%NOTFOUND;
     17      PIPE ROW(v_result_set);
     18      END LOOP;
     19   return;
     20  END;
     21  /
    
    Function created.
    
    SQL> select *
      2  from table(get_prof_ctab_value);
    
       PROF_ID   CTABV_ID    CTAB_ID
    ---------- ---------- ----------
             1          2          3
             4          5          6
    
  • Object of type class coldfusion.tagext.io.FileListTable cannot be used as a table

    Hello, everyone.

    I'm playing with the function 'getAllTheText' of Raymond Camden, and I'm having one of those days where no matter what I do, I get an error.  The title is only the most recent.

    I just try to open the file "test1.cfm" which was included in the .zip file.  I updated the directory that I'm trying to read.  At first, it was the only change that I made; but gives the error message defined in the title of this post.

    If I keep this way, FileListTable can not be used as a table.  If I try to use any other extra parameter in directoryList other than the path, I get the same error message.  If I try to use CFDIRECTORY and change in query, I get message error "complex objects cannot be used in simple expressions."

    Here's how the code started:

    <cfset gatt = getallthetexts.textextractor()>
    <cfset files = directoryList("./folder","false","query","*.pdf")>
    <cfloop index="f" array="#files#">
      <cfif NOT FindNoCase(".DS_store",f)>
        <cfdump var="#gatt.read(f)#">
      </cfif>
    </cfloop>
    

    If I take all but the first argument of directoryList, it works fine... but then I get all PDF files that are also in the file .zip and recursive folders.  It's too.

    Suggestions?

    Thank you and have a great weekend.

    ^_^

    Changed to "application" of 'path' and got a table.

  • ORA-06550 PLS-00382: expression is of the wrong type

    Please help me with the following script:

    declare
    cursor c1 is
    Select prod_country_id
    of prod_country
    where eccnum = "NOCLASS-SG" and ccode = 'SG ';
    New_data_type TYPE IS TABLE C1% ROWTYPE;
    new_data_tab new_data_type;
    Start
    Open c1;
    loop
    collect fetch c1 into bulk
    in new_data_tab limit 500000;
    OUTPUT WHEN c1% NOTFOUND;
    ForAll i in 1... new_data_tab. Count
    Update prod_country
    Set eccnum = "NOCLASS".
    where prod_country_id = new_data_tab (i);
    end loop;
    Close c1;
    commit;
    end;

    Gives following error:

    ORA-06550: line 17, column 32:
    PLS-00382: expression is of the wrong type


    Please help immediately.
    Need to update block.

    Thanks in advance

    user13759851 wrote:
    Just change my query and now its execution without the previous error:

    So what? It is always wrong.

    The correct way using just SQL to perform the update - which is the most effective and scalable way. And much faster.

    As for your code? Everything is fake.

    You read the update lines. Without locking of these lines. And these same lines are changed in the code. This is false.

    Then you agree inside the loop. This is false.

    You now get a cursor (where the lines are not locked) and changes of committng to these same lines. It is a violation of the standard ANSI SQL - get everywhere is committed. You consume more resources Oracle doing this. If this process crashes - and there is an excellent chance that Oracle will not provide a coherent reading/snapshot while the data are changed and committed - you what? A process that has changed some data and no other data. We ask that the corruption of data. A total lack of data integrity.

    You set the limit to a ridiculous 500000. This is false.

    It's not faster than with a 1000 limit. But she will consume 500 times more memory. And not just any memory. The more expensive server memory that a process of PL/SQL can consume - PGA.

    You have provided a perfect example of How not to Code for Oracle+.

    Now trash. You never forget retry such an erroneous approach. Use a single SQL UPDATE statement. And then a COMMIT.

Maybe you are looking for

  • Firefox does not respond when you try to delete the history.

    When I go to "clear recent history" and click on "Clear now" he says immediately that the program is not responding. Done the same after the restart. It is not let me clear my history, and I've tried 6 times, all with the same results... I have to cl

  • Ssatellite U300 - 13K does not wake from sleep mode

    He has had this problem with windows vista and I decided to switch to Win7, but it still has the same problem.He falls asleep, but then don't wake up no matter what I click. Can you help fix?Thank you

  • The firewall is disabled

    Hi, firewall on my MacBook Pro has been disabled by default and I noticed that at the time after using it for 3 months. What was I outlined and is there a way to check if there is no danger? Thanks in advance for the answer!

  • Allows software deletion of channels, but not the user

    I use OnDeleteRequest action to prevent the user from delete channels in my custom device.  However, I realized that this also prevents the code, I write (in this case, running on a right click action) to remove strings.  I need a way to differentiat

  • KB981852 is offered several times to be installed on the machine

    Original title: KB981852. KB981852 is offered to install several times, even if it is already installed