Cannot use varchar variable of the type of entry into the procedure.

Hello

I created as a simple procedure... its like this...

SQL > CREATE OR REPLACE PROCEDURE
2 input_columns
(3)
4 table_name IN user_tab_columns.table_name%TYPE,
5 ignore_columns in VARCHAR2 (90)
(6) IS
stmt 7 VARCHAR2 (3000);
BEGIN 8
stmt 9: = "INSERT INTO ignore_columns VALUES ('|)" table_name | ',' | ignore_col
option |') ' ;
10
11 EXECUTE IMMEDIATE stmt;
12
13 END;
14.

CAUTION: Procedure created with compilation errors.

SQL > show errors;
Errors in PROCEDURE INPUT_COLUMNS:

LINE/COL ERROR
-------- -----------------------------------------------------------------
5/27 PLS-00103: encountered the symbol "(" quand attend un de la) "
Next:
:= . ), @ % of default characters
The symbol ': = ' has been replaced by "("pour continuer.) "

The ignore_columns of the table has been created.

If I remove the size of the variable ignore_columns or if I define it as a number, the procedure is created successfully.

When I'm not defining the size of the variable, I can't pass parameters for the ignore_columns column. Could you please help me.

Thank you.

Azeroth wrote:
@Twinkle... it does not work

SQL> create table ignore_columns
  2  (a varchar2(90),
  3  b varchar2(90));

Table created.

SQL> CREATE OR REPLACE PROCEDURE
  2   input_columns
  3   (
  4   table_name IN user_tab_columns.table_name%TYPE,
  5   column_list IN VARCHAR2
  6   ) IS
  7   stmt VARCHAR2(3000);
  8   BEGIN
  9   stmt := 'INSERT INTO ignore_columns VALUES (:1,:2)';
 10
 11   EXECUTE IMMEDIATE stmt using table_name,column_list;
 12
 13   END;
 14   /

Procedure created.

SQL> execute input_columns('HELL', 'HELLO');

PL/SQL procedure successfully completed.

SQL> select * from ignore_columns;

A
-----------------------------------------------------------------------
B
-----------------------------------------------------------------------
HELL
HELLO

Twinkle

Tags: Database

Similar Questions

  • Cannot use Global Variable in the Structure of the event

    I'm using LabVIEW 2009.

    In my LabView project, I have a global Boolean variable called EStop. I can read and write the global variable. If I double click on the global variable, it takes me to EStop.vi which includes a text button. EStop.vi is part of my project.

    In one of my report, I have a Structure of the event. If I go to one of the event handlers in this case Structure and right click and select Add event, I get a list of possible events. But this list does not EStop or an EStop events.

    I would like to add an event to EStop case: changed value.

    Why I can not add to a case of events events that include events on Global Variables as value changed?

    How can I add EStop: event changed my structure of the event value.


  • Can Oracle 10g - I use a variable for the access of the user identifywhat tablesto?

    I have the following code in a trigger (PL/Sql block) of a form:

    Select fieldname in user1.sometable myvar;

    is it possible to use a variable instead of coding hard "user1"? And on the same subject, this variable would also be declared in the world?

    Thanks in advance,
    Darren

    Hello!

    User1 is the owner of the table sometable.

    If only the User1 runs your form, there is no need to put the tableowner in front of the tablename parameter.

    If other users run your form, you must create a public or private (for each user) synonym of this table.
    After that, you don't need to use owner.tablename in your sql statement.

    But:
    You cannot use a variable for the user name without using dynamic sql
    as you do if you create a recordgroup.

    Concerning

  • Cannot use windows update after the new installation of xp sp2

    Cannot use windows update after the new installation of xp sp2

    How to reset the Windows Update settings?
    http://support.Microsoft.com/kb/971058

    Harold Horne / TaurArian [MVP] 2005-2011. The information has been provided * being * with no guarantee or warranty.

  • I cannot use windows update. The 80070490 error keeps coming back.

    I cannot use windows update.  The 80070490 error keeps coming back.

    I tried "System update tool", "windows repair" and I don't seem to be able to get upgrades using my DVD of windows.  What can I do?

    Any help would be much appreciated

    I cannot use windows update.  The 80070490 error keeps coming back.

    I tried "System update tool", "windows repair" and I don't seem to be able to get upgrades using my DVD of windows.  What can I do?

    Any help would be much appreciated

    Reset your Windows with this FixIt components update:
    How to reset the Windows Update components?

    Reset.

    Try to update.

    If it still does not work, try this...

    1. Start an elevated command prompt.
    2. Run the following commands pressing on enter after each line:

      net stop wuauserv

      CD %SystemRoot%\System32

      Ren C:\Windows\SoftwareDistribution SoftwareDistribution.old

      net start wuauserv

    3. Reset
    4. Try to update.

    * Important * When you do this, the following problems occur:

    • Updates that are currently downloaded but which have not yet been installed must be downloaded again by using Windows Update or Microsoft Update.
    • When you remove the Software Distribution folder, your download history is deleted.
    • If you currently receive updates from Microsoft Update and Windows Update, you will need to reselect this option from the Windows Update Web site.


    * Note *
    if the problem is resolved and you can successfully download and install the updates, you can delete the directory SoftwareDistribution.old to recover disk space.


    STILL no? We have something to try...

    Use this FixIt:
    How to get the latest version of the Windows Update Agent

    Reset.

    Save components WU:

    1. Start an elevated command prompt.
    2. Run the following commands pressing on enter after each line:

      regsvr32 Jscript.dll
      regsvr32 c:\windows\system32\wuapi.dll
      regsvr32 c:\windows\system32\wuaueng.dll

    Reset.

    Try to update.

    If it still does not work after that - repeat ONCE more that part...

    Reset your Windows with this FixIt components update:
    How to reset the Windows Update components?

    Reset.

    Try to update.

    Come back and let everyone know how you faired.

  • When I down loaded a file have icon as the sample images I cannot use them separately. The purchased version will allow mw to do?

    When I down loaded a file have icon as the sample images I cannot use them separately. The purchased version will allow mw to do?

    Yes, you should be able to edit it in Adobe Illustrator.

  • Cannot use 'lab1' host because the host CPU is not compatible with the judgment of the virtual machine suspend state.

    I see that this error was mailed here, but can't seem to find a position with a resolution.

    We use Lab Manager 4.0.4 and just upgraded the hosts in our laboratory.  Before updating to ESXi 4.1 ESX 4.0 u1, we cancelled all VMs in all configurations.  There is none who were suspended, they were all turned off.  We have improved vcenter 4.0 to 4.1 as well.  We moved from a dell poweredge 1950 with two quad core intel L5410 to a r610 with two quad core intel processor E5506.

    When I try to turn on some of the lab configurations (our VM models all work fine), I get this error:

    • Cannot use 'lab1' host because the host CPU is not compatible with the judgment of the virtual machine suspend state.

    I threw the State for the lab configuration (even if it was turned off and cancelled) and still get this message.  I guess the processor architecture of these chips is quite similar, and both are Intel.

    If I go into this directory of Manager of laboratory inside the data store for one of these virtual machines that does not light and add to the inventory, he turned and starts fine on my server esxi 4.1.  So how do Lab Manager to get account it's well deploy and start it?

    Hey billk.

    Although not supported completely, you can solve it by going to the SQL of Lab Manager database.  Make sure that you back up your database before you do anything like that.

    Open the table "fsdir" and corresponds to the dir_id with the id Lab Manager VM.  Once you find the relevant line, change suspend_proctype_id to null (Zero-Ctrl).  You can do this while Lab Manager is still running.

    The results can be unstable (i.e. Windows can crash if it was a drastic change of CPU), but at least you look at a hard reset.  The bat reset certainly not being able to return to the previous state.

    Also note that while Lab Manager does not include CVS, if you activated, your virtual machines still work in CVS mode.  If you have a mixture of heterogenious of hosts in a cluster for Lab Manager, you can see this question pop up a lot.  There is absolutely nothing wrong with take back the virtual machine because of the VCA, but Lab Manager thinks otherwise and prevents it.

  • "You cannot use this version of the application Adobe After Effects CS6" even after the patch

    I get the error message "you cannot use this version of the application Adobe After Effects CS6 with this version of Mac OS x. You have Adobe After Effects CS6 11.0.1. I installed the patch, but still not the same error.

    Install the After Effects CS6 (11.0.3) updated:

    http://Adobe.LY/AE_CS6_1103

  • After the accident and reinstall: cannot use this product under the guest account

    I had a computer crash. After reinstall ADOBE Standard XI (Windows, German) I get the message: cannot use this product under the guest account.

    I tried to run it as an admin - without success. Before thr crash, it works perfectly.

    What is the problem - and how to solve?

    I run Windows 8 PRO

    Thanks for the help, Uli

    http://forums.Adobe.com/thread/783362

  • Cannot use this version of the application with this version of MAC OS x

    When I try to download the new beta, I get a message that says: cannot use this version of the application with this version of MAC OS x

    I'm new to Mac, but I installed all the updates and software that did not always help. I don't have to buy a new OS I do?

    Muse requires Mac OS X 10.6 or later.

    http://Muse.Adobe.com/tech-specs.html

  • don't forget the select result of a statement to be used several times in the procedure

    Hi all

    I'm sorry for this kind of question, I'm not newbie, but still need your help.

    My need is remember the select result of a statement to be used several times in the procedure.

    My first guess is to use a temporary table, but I think there's better decisions.

    For example, I should make a heavy request

    Select the code from table_function (param1)

    Then, this query is used to insert a list of the id in table1, delete table2 and update in table 3.

    Help me please do not use if possible temporary tables.

    If there is more than one column, you need to create an object type at the database level. Create a collection of this type of object in the procedure.

    Example:

    CREATE OR REPLACE TYPE "OBJ1" as OBJECT(
            column1 varchar2(256 CHAR),
            column2 varchar2(35 CHAR)
            );
    
    CREATE OR REPLACE TYPE "nt_obj1" as table of OBJ1; -- this could be done at procedure level as well
    
    DECLARE
       t_employee_ids   nt_obj1;
    BEGIN
       SELECT OBJ1(column1,column2)
         BULK COLLECT INTO  t_employee_ids
         FROM table1
        WHERE column3 = NNN
    .............
    .....
    
  • Use a variable in the paragraph in PL/SQL

    Hello

    Please let me know how to use variable in the PL/SQL Select query clause.

    [code]

    create or replace PROCEDURE emp

    2 EAST

    emp_id 3 VARCHAR2 (1000);

    4 BEGIN

    emp_id 5: = '1989100351, 1989100352, 1989100354';

    6 - emp_id: = '1989100351';

    7 FOR rec IN (select employee_id of employee emp_id WHERE employe_id IN)

    8 LOOP

    9 dbms_output.put_line (rec.employee_id);

    10 END OF LOOP;

    11 END emp;

    12.

    DISPLAYS THE ERROR MESSAGE;

    Created procedure.

    [email protected]/ICSN - SQL > no errors.

    [email protected]/ICSN - SQL > EXEC emp;

    BEGIN emp; END;

    *

    ERROR on line 1:

    ORA-01722: invalid number

    ORA-06512: at "emp", line 7

    ORA-06512: at line 1

    [/ code]

    You cannot use pl/sql variable with values separated by commas in the paragraph directly, you must break into multiple records

    Try this too [g 11]

    create or replace PROCEDURE emp

    IS

    emp_id VARCHAR2 (1000);

    BEGIN

    emp_id: = '1989100351, 1989100352, 1989100354';

    FOR rec IN (select employee_id from employee WHERE employe_id IN ())

    Select (column_value) .getnumberval)

    from xmltable (emp_id)) double.

    )

    LOOP

    dbms_output.put_line (Rec.employee_id);

    END LOOP;

    END emp;

    /

  • Using of Variable in the filter expression will not scan.

    IN ODI 11.1.1.3.0, I've defined a Variable of type 'Alphanumeric' (SelectionDate), default = January 1, 1970 with the query select: select to_char (SYSDATE, 'DD-MON-YYYY') of double.
    I intend to use this variable as a scenario (parameter) variable that receives a value in the form "DD-MON-YYYY', of the execution environment.
    I refreshed the variable and the value received June 16, 2011 (current date). So far so good.

    Then, I defined an Interface and use the variable in a filter expression:

    Filter active: checked

    Tab implementation:
    SOURCE_VIEW. SELECTION_DATE BETWEEN TO_DATE (' #PROJECT1.) SelectionDate', 'DD-MON-YYYY') AND (TO_DATE (' #PROJECT1.)) SelectionDate', 'DD-MON-YYYY') + 1).

    Run on: Source

    During the verification of the expression (click the check mark in the application tab) I always get: Expression is not valid for the DBMS. java.sql.SQLDataException: ORA-01858: a non-digit character was found here where was waiting for a digital.

    I can't filter to analyze. Thank you for your ideas of what could be wrong.



    Jose.

    Hi Jose,

    You must set this variable in a package and refresh it. Then place your interface with the current filter condition.
    Run the package. It should work.

    Thank you
    Fati

  • Use of variable in the For-Each statement

    Hello gurus.

    I'm having a problem using a variable, I created in a statement for each. Here is the code I am using
    My goal is to create a variable based on the type of Bill. If the invoice is a proof or a reprint, a copy should be printed. If it's a final bill, I need two copies.

    <? xdoxslt:set_variable($_XDOCTX,_'x',_0)? >
    for each<? If: Print_Additional_Header_Text_ID238 = "PROOF"? > <? xdoxslt:set_variable($_XDOCTX,_'x',_1)? > <? end if? >
    <? If: Print_Additional_Header_Text_ID238 = "REPRINT"? > <? xdoxslt:set_variable($_XDOCTX,_'x',_1)? > <? end if? >
    <? : otherwise (Print_Additional_Header_Text_ID238)? > <? xdoxslt:set_variable($_XDOCTX,_'x',2)? > <? end if? >
    <? xdoxslt:get_variable($_XDOCTX,'x')? > <? for-each@section:xdoxslt:foreach_number($_XDOCTX,1,$x,1)? >

    foreach is the loop that I use to repeat sections of the Bill.

    When I run with the last impression for each preview, I get an error that says "undefined variable: 'x'"»
    But when I remove the last for each good variable, 1 or 2, will show in the invoice.

    My question is: How can I use the variable 'x' in <? for-each@section:xdoxslt:foreach_number($_XDOCTX,1,$x,1)? >

    TIA
    Darius

    Published by: 852460 on May 24, 2011 08:31

    Published by: DEK17 on July 20, 2011 13:15

    Probably, this will help you

    http://winrichman.blogspot.com/search/label/multiple%20copy

    Try

    
    or
    
    
  • Cannot use windows update, get the message "site has encountered a problem and cannot display the page you are trying to view.

    original title: can't use windows update, get the message 'the website has encountered a problem and cannot display the page you are trying to view. I am running xp. Can anyone help?

    I can't use the update. Still get the same message. Fix - it for Windows can not solve the problem. I am running xp. Help, please!

    Hi Hojo11779,

    You can see the mentioned knowledge base article and check.

    You receive an error message "Windows Update has encountered an error and cannot display the requested page" when you try to install an update

    http://support.Microsoft.com/kb/883614

    Let us know if it helps.

Maybe you are looking for

  • HP 12 c error 5

    Hi guys,. I am trying to solve a time value of money matters and I get 5 error and error codes in Appendix D of the operating instructions don't make sense because I'm trying all the required values and no error conditions are met. Example: PV = $1,0

  • Satellite M100-179 and cooling fan

    Cooling fan runs every 10 seconds. It must be so?without load, the restoration

  • Programmatically set the size of a table control (not the number of col and lines)

    Hi all I am trying to create a little VI, in which the user selects the number of columns and rows in a table, and after clicking on a button 'OK', the table control is displayed in the control panel (to be filled in by the user). To do this, I use t

  • Error 'Could not find type' in 2013 VS designer

    I use VS 2013 with Measurement Studio 2013. I know that there is no integration VS 2013 supported, but it is very good and so far I've been able to work around this using the proposed methods (e.g., generation of the licx file manually). However, I n

  • Printer HP 2710 Uni-Funtion - cannot scan from Windows 8.1

    I have a HP 2710 connected to my home network via ethernet.  On my new laptop Win 8.1, I downloaded and ran the HP printer Install Wizard (hppiw.exe), which gives the impression but no other 'multi-function' - i.e. I have not all features of scan, fa