Mistake to link the variable with the clause "like %"?

Hello everyone;

I would like to know how to make a like clause to bind variables, with this code, I get ' ORA-00933: SQL not correctly completed command ' error
:
v_query:= 'UPDATE ' || collection(i) ||' SET REF_PLAN=:quatre_champ WHERE FAM_SIM like ''%'':prem_champ''%'' AND PRISE_V1P like ''%'':deux_champ''%'' AND BROCHE_V1P like ''%:trois_champ%''';
                              EXECUTE IMMEDIATE v_query USING quatre_champ,prem_champ,deux_champ,trois_champ;
Maybe my "'" are in a bad position?

Thanks for your help, regards.

Try this:

v_query:= 'UPDATE ' || collection(i) ||' SET REF_PLAN=:quatre_champ
WHERE FAM_SIM like ''%''||:prem_champ||''%''
AND PRISE_V1P like ''%''||:deux_champ||''%''
AND BROCHE_V1P like ''%''||:trois_champ||''%''';

Tags: Database

Similar Questions

  • HOW WE LINK SHARED VARIABLE WITH DEVICE (SENSOR MODBUS ADDRESS) IN E/S SERVER MODBUS

    I USE THE IO SERVER MODBUS WITH SHARED VARIABLES TO COMMUNICATE WITH THREE DEVICES (TEMPERATURE, PRESSURE AND LEVEL DEVICE). EACH DEVICE HAS ITSELF MODBUS ADDRESS TO BE IDENTIFIED IN THE E/S SERVER. THESE DEVICES ARE SUPPORTED BY THE MODBUS SERIES.

    (1) HOW CAN I CONNECT EACH DEVICE SHARED THE DEVICE TO HELP ADDRESS VARIABLE?

    (2) HOW DO I USE THE ADDRESS OF DEVICE FOR IDENTTIFY THE E/S SERVER APPLIANCE?

    COULD YOU HELP ME?

    Thank you

    Hello

    You will find attached a few slides explaining the different steps to create variables shared with e/s server Modbus.

    You can also have a look at the demo on the website.

    I hope this will help you communicate with your devices.

    Kind regards

  • Value of Variable with OracleDiagent throwing error in white

    Hi all

    In my process I use 3 variables as input #GL_Product_code, #GL_Period_no, #GL_Year, on this basis, I need to get all the details, if I gave the white input from of the two other entries value must extract the value below in the code where condition
    .. .or product_code = nvl('#GL_Product_code',product_code) and period_no = nvl('#GL_Period_no',period_no) and year = nvl('#GL_Year',year)

    but when I use local agent my process of execution with errors, when I execution of his mistake to launch as variable with OracleDiagent has no value

    Error details

    oracle.odi.core.exception.OdiRuntimeException: java.lang.Exception: ODI-17506: Variable has no value: GL_VALIDATE.GL_PERIOD_NO

    Thanks for your suggestion...

    Published by: 981371 on February 11, 2013 09:53

    Published by: 981371 on February 12, 2013 02:28

    Published by: 981371 on February 12, 2013 22:10

    Give a default value for this variable as 'IS NULL' or 'IS NOT NULL' somethhing to be replaced if you don't pass any value then runt.

    Chantal
    http://dwteam.in

  • What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?

    What is the significance of the CURSOR WITH HOLD clause in a cursor declaration?

    A cursor that has been declared with the clause WITH HOLD, after the word CURSOR remains open after a COMMIT or a ROLLBACK. The following example shows how to use the following clause:

         EXEC SQL          DECLARE C1 CURSOR WITH HOLD          FOR SELECT ENAME FROM EMP          WHERE EMPNO BETWEEN 7600 AND 7700      END-EXEC.
    

    The cursor must not be declared for the UPDATE. The WITH HOLD clause is used in DB2 to override the default, which is to close all cursors on validation. Pro * COBOL provides this clause in order to facilitate the migration of applications to DB2 to Oracle. When MODE = ANSI, use Oracle DB2 default, but all host variables must be declared in a declare Section.

    Reference:

    Oracle documentation!
    http://docs.Oracle.com/CD/B10501_01/AppDev.920/a96109/pco03dbc.htm

  • Problem with dynamic setting where the clause OFA

    Hi all

    I have a view object with the following query:

    SELECT rownum LINENUM,

    B.line_id LINE_ID,

    B.INVENTORY_ITEM_ID INVITMID,

    B.QUANTITY_DELIVERED PICKQTY

    MTL_TXN_REQUEST_HEADERS a,.

    MTL_TXN_REQUEST_LINES B

    WHERE A.HEADER_ID = B.HEADER_ID

    AND A.MOVE_ORDER_TYPE = 2

    AND "on" =: 1

    AND B.TO_SUBINVENTORY_CODE = NVL(:4,B.TO_SUBINVENTORY_CODE)

    AND A.request_number = NVL(:5,A.REQUEST_NUMBER)

    UNION ALL

    SELECT rownum LINENUM,

    a.wip_entity_id LINE_ID,

    a.INVENTORY_ITEM_ID INVITMID,

    a.QUANTITY_ISSUED PICKQTY

    WIP_REQUIREMENT_OPERATIONS has

    eam_work_orders_v b

    WHERE a.wip_entity_id = b.wip_entity_id

    AND "on" =: 2

    AND a.ATTRIBUTE2 = NVL(:4,a.ATTRIBUTE2)

    and b.wip_entity_name = NVL(:6,b.wip_entity_name)

    I need to dynamically pass a condition to my where clause that I can manage it by setting two binding settings in the query of vo and can pass it on but the problem is the connection variable contains a string like 1311,13112,14445 that I need to spend for a domain like B.line_id in the first query and b.wip_entity_id in the second query , so when I'm passing the string as a value it works fine, but it gives for value separetd by comma prob.

    so I tried passing dynamic where clause, but there is every time that the execution of the first clause only how can I dynamically pass both queries.

    vo.setWhereClause ("LINE_ID in" + wherclause);

    Please help me

    Thnaks

    Deb

    Hello

    Actually I'm passing the parameter to the basic page popup, so in page popup page and the base, I was using the VO even to run then, probably due to that he was running again for all data, so for the basic page I created a new VO and tried to pass the parameter like when clause for questioning now it runs very well Thank you for all your help

  • How to replace the variable with the help OF the operator?

    Hello

    I'm creating a form where the user selects the check box which products he wants to see. After the choice, I should show all sales of this product, but the selection does not recognize the variable after the IN operator, for example:

    SELECT the product, price, quantity
    FROM the sale
    Product WHERE IN (vcProducts);

    Can someone help me?

    Cree

    I guess that vcProduct is a varchar2 variable where you have a chain of your prodids, as ' 4711,4712 concatinated, 4713'. May be you have each place value '. Is not the question, which is not part of the sql syntax set. You either have a list of enumeration or a subselect.

    Where do you need it? In the block or Pl/Sql where clause.
    In the latter case, you can configure the list in a variable (with enclosing "") and set the block where property.

    In the first of may by INSTR is useful, INSTR (vcProduct, vcDelim | table.prod_id | vcDelim) > 0. Make sure you have your list attached and separated by the vcDelim. If you prodct table with the number of lines (million), it can be slow because no index will be used.

    Dynamic sql or.
    Or write a subquery und temp-table.

  • Problem with REPLACING the clause in Sybase

    I am facing a problem with REPLACING the clause in embedded SQL with a Sybase database.

    My Cold Fusion Server is MX 7.

    The database is the Adaptive Enterprise/12.5.0.3/EBF 10689 IR/P/Sun_svr4/OS Server 5.8/rel12503/1915/64-bit/FBO/Thu 23 Jan 16:05:19 2003

    That is the problem. I have a variable bureau_incode of Cold Fusion, which I use to set the values in my IN clause. When I comment on my request and display this value in the HTML page, bureau_incode has the following value:

    ('TAB', 'OGC', 'BIG', 'OLA', "MDG", "SEO", "OSP", "ANOTHER OWD ',' ', 'PSHSB", "CAT", "WTB")

    My CFQUERY embedded SQL looks like this:

    Quote:
    < name cfquery = "qResults" datasource = "#request.dsn #" >
    Select Name,
    bureau_code,
    Telephone,
    Mobile phone,
    Pager,
    E-mail
    Availability,
    Explanation,
    Password,
    Admin,
    last_login = convert (varchar (20), last_login, 0)
    of PAMS where availability = ' don't
    < #request.seltype # cfif IS NOT "ALL" >
    and bureau_code IN #bureau_incode #.
    < / cfif >
    < / cfquery >
  • By mistake I replaced a photo with another file. The miniature shows always the original photo - is anyway I can get the original of this thumbnail image?

    By mistake I replaced a photo with another file.  The thumbnail still shows the original image.  Is there anyway I can retrieve the original of this thumbnail image?

    When a file overwrites (replaces) another... the original is gone.

    This happens usually when the replacement file has the same file name
    as a file exists and that you answer Yes when the dialog box asks you if you
    replace file a file b.

    What are the exact steps you used when the file has been replaced and
    This software has been involved?

  • I'm not having implemented the cd with me. How can I update the window components. by mistake I uninstalled the

    I'm not having implemented the cd with me. How can I update the window components. by mistake I uninstalled the

    Reinstall windows components, you've accidentally deleted when you have the game CD with you.

  • How to create a file name variable with the County and the date?

    Objective: Create a file name variable with the County and the date

    Error: get a lot of error. Do you know how to change my code?

    Question: how to create a file name variable with the County and the date?

    Mini code:

    std::string * rawfilepath;
    std::string * rawfilename;

    rawfilepath = "./shared/documents/";
    RawFileName = rawfilepath + 'rawlog -' + 0 + '-.txt ';
    QFile file (rawfilename);
    If (file.exists ()) {}
    rawfilenamecount ++;
    RawFileName = "./shared/documents/rawlog-" + rawfilenamecount + "-.txt ';
    }

    Thank you for your attention,

    Thank tzander reminding me the idea. Method of cascades is not good for me because all of the kernel code is written by Native. If I change the channel to QString, I need to change a lot of codes.

    Solution is below.

    While (access (rawfilename, F_OK)! = - 1) {}
    rawfilenamecount ++;
    sprintf (format, RawFileName, rawfilenamecount);
    fprintf (stderr, "file exists");
    }

    Rawlog = fopen (rawfilename, "w"); Save the file in a specific path.
    fprintf (rawlog, "System Time (ms)" "");

  • BlackBerry smartphones of the suggestions for a weather link that works with the storm

    Hi guys,.

    Suggestions for a weather link that works with the storm?

    I like this one:

    http://www.NOAA.gov/

    I put in my zip code, and then when he shot to the top of my local forecast I bookmarked this page in my Storm. It marks the latitude and longitude, so when I go there next time I have to weather day.

    Easy to read and not a bunch of gadgets ads cluttering it up.

  • WITH THE CLAUSE

    Hi all

    I'm using oracle 11.2.0.4

    I m using this for the purpose of learning

    Below is my table and insert statement

    CREATE TABLE COMPANY (NUMBER EMPLOYEE_ID, EMPLOYEE_NAME VARCHAR2 (30), NUMBER OF MANAGER_ID)

    INSERT INTO THE COMPANY'S VALUES (1, 'FRED', ");

    SOCIETY VALUES (2, 'BARNEY', '1');

    SOCIETY VALUES (3, 'WILMA', '1');

    SOCIETY VALUES (4, 'BETTY', '3');

    INSERT IN THE VALUES(5,'PEBBLES','3') SOCIETY;

    INSERT IN THE VALUES(6,'BAM-BAM','4') SOCIETY;

    INSERT IN THE VALUES(7,'DINO','4') SOCIETY;

    INSERT IN THE VALUES(8,'HOPPY','4') SOCIETY;

    WITH RSFC(CK,PK,LVL,HIER) AS

    (SELECT EMPLOYE_ID, MANAGER_ID, 0 AS LVL, EMPLOYEE_NAME LIKE YESTERDAY)

    SOCIETY

    WHERE MANAGER_ID IS NULL

    UNION ALL

    SELECT EMPLOYE_ID, MANAGER_ID, LVL + 1, YESTERDAY. '/' || EMPLOYEE_NAME

    OF THE RSFC R INNER JOIN COMPANY F

    ON R.CK = F.MANAGER_ID

    )

    WIDTH OF SEARCH FIRST BY CK ORDR SET

    SELECT A.LVL, A.CK, A.PK, A.HIER, ORDR

    THE RSFC HAS

    ORDER BY ORDR

    01FRED1
    121FRED/BARNEY2
    131FRED/WILMA3
    243FRED/WILMA/BETTY4
    253FRED/WILMA/PEBBLES5
    364FRED/WILMA/BETTY/BAM-BAM6
    374FRED, WILMA, BETTY, DINO7
    384FRED, WILMA, BETTY, HOPPY8

    First part, I believe, as well, explains Frank

    hierarchical queries

    next part in bold, I need to understand

    Thanks and respect.

    Guylaine

    Hi, lyly,

    You said that you did not understand the part highlighted in your query.  It looks like the 2 lines are highlighted:

    WIDTH OF SEARCH FIRST BY CK ORDR SET

    SELECT A.LVL, A.CK, A.PK, A.HIER, ORDR

    I guess that it's a typo.  The 2nd day of these lines is just the main SELECT clause; This is the 1st line, the clause of the SEARCH, who really needs an explanation.

    As far as I know, the SEARCH clause is only for the sorting of the results.  In other words, the a WITH recursive clause results will be the same, no matter what you put in the SEARCH clause, or if you omit the clause of RESEARCH.  The only purpose of the clause of RESEARCH is to generate the column command (ORDR in your example), which reflects where each row fits in the graph defined by your recursive query.  (Maybe, if you use non-deterministic user-defined functions, it can be a difference in the results.  Chances are, you never have to worry about this).

    If you do not use a clause in RESEARCH at all, it seems like by default

    WIDTH OF SEARCH FIRST BY NULL...

    In other words, the lines appear in order by level and in no particular order after that.  In your case, that would mean 'FRED' would come first, then "BARNEY" and "WILMA" (not necessarily in that order), followed by all the children of 'BARNEY' or 'WILMA' and so on.  No column order would be generated, so you could not guarantee order in the ORDER BY clause.

    I'm not sure that there is nothing you can do with a clause of RESEARCH that you can not do without a.  In other words, the SEARCH clause automatically generates a command column.  I believe you can still create an equivalent ordering column in the recursive query itself.  In your example, you could say

    ORDER BY lvl, ck

    to get the results sorted the same way.  Sometimes, using a SEARCH clause is much more convenient, and I bet that sometimes it is therefore more effective, too.

    2937991 wrote:

    Hi all

    I'm using oracle 11.2.0.4

    I m using this for the purpose of learning

    Below is my table and insert statement

    CREATE TABLE COMPANY (NUMBER EMPLOYEE_ID, EMPLOYEE_NAME VARCHAR2 (30), NUMBER OF MANAGER_ID)

    INSERT INTO THE COMPANY'S VALUES (1, 'FRED', ");

    SOCIETY VALUES (2, 'BARNEY', '1');

    ...

    As always, thank you for posting this information: it really helps!

    Manager_id is a NUMBER, it would be better if you don't quote it.  In other words, it would be more clear, more effective and less prone to say:

    INSERT INTO COMPANY (EMPLOYE_ID, EMPLOYEE_NAME, MANAGER_ID) VALUES (1, 'FRED', NULL);

    INSERT INTO COMPANY (EMPLOYE_ID, EMPLOYEE_NAME, MANAGER_ID) VALUES (2, 'BARNEY', 1);

    ...

    In this example, the unnecessary quotation marks do not hurt a lot, but they do not help all.

  • WITH the clause can be used with an insert statement?

    Hello

    Can I use a SQL with a clause of an insert

    Something like
    create table tem (l number)
    
    insert into tem
    (l)
    (with 
      t0  as 
      (Select exp_amt as t0 from exp_main)
    select t0 from t0)
    The declaration itself works fine, but it throws the following error with insert
    Error at Command Line:8 Column:17
    Error report:
    SQL Error: ORA-32034: unsupported use of WITH clause
    32034. 00000 -  "unsupported use of WITH clause"
    *Cause:    Inproper use of WITH clause because one of the following two reasons
               1. nesting of WITH clause within WITH clause not supported yet
               2. For a set query, WITH clause can't be specified for a branch.
               3. WITH clause can't sepecified within parentheses.
    *Action:   correct query and retry
    The reason why I use this format is because we strive to produce sqls to Analytics and queries are generally formed like this. So instead of change requests in bulk, I was hoping that we were able to insert it.

    Please notify

    Thank you
    Sun

    Published by: ryansun on August 14, 2012 01:59

    >
    create table tem (general number);
    table created TEM.

    insert into tem (l)
    with t0
    as
    (Select 1 as double t0)
    Select t0 t0;

    1 inserted rows.

  • with the use of the clause in the cursor

    is it possible to use with the clause in the cursor declaration.

    See the simple example below.

    It gives an error.



    declare

    cursor t is

    (with Salvation as

    (select * from pepole)


    Select distinct hi.id of salvation where id = 55);


    Start


    null;


    end;

    Remove the outdoor set of parentheses.

    declare
    
    cursor t is
    with hi as
    (select * from emp )
    select distinct sal from hi;
    begin
    null;
    end;
    
  • WITH the clause as inline view

    I m using oracle DB 11.2.0.2.0
    I have a question about usage WITH the clause which made a temporary transformation (Materializing) automatically.
    I want the query to operate as a point of view WITH clause online because the transactions table materailizing would kill performance.
    I m able to see the transformation of the temporary table in the explain output plan.
    Have we not all suspicion to stop the transformation of Temp table?

    Here is an example of the sample
    I have the query union multi (2 requests), couple of table is common to all the union queries. the request should not be materialized. It must operate as a point of view common inline.

    WITH ORDERS AS
    (SELECT h.order_number,
    l.line_number,
    l.line_id
    order_headers h, order_lines l)
    SELECT...
    COMMANDS, X, Y
    WHERE THE...
    UNION ALL
    SELECT...
    ORDERS, A, B, C
    WHERE THE...

    Try this...

    WITH ORDERS AS
    (SELECT /*+ inline */ h.order_number,
    l.line_number,
    l.line_id
    from order_headers h, order_lines l)
    ...
    

    To achieve the opposite effect, you can use SELECT / * + materialize * /.

    However, keep in mind that these tips are undocumented, so use them at your own risk. If you think that Oracle is to choose a bad execution plan, you must sign a deal with Oracle Support to see if this is a bug.

    Kind regards
    Bob

Maybe you are looking for

  • Software for the disc md1000h of HP SimpleSave external hard

    Hello Due to some problems I had with double back-up on my hard drive, I decided to just format the hard drive and start on a table shaves.  However, I see the user guides on the support page for this product (http://h10025.www1.hp.com/ewfrf/wc/produ

  • Saturday A300 - USB ICH8 Family USB Universal Host Controller does not work

    Device: Intel(r) ICH8 Family USB Universal Host Controller - 2830 until 2836 and 283 has DriverVersion is: 8.0.0.1008DriverDate: 15.09.2006 does not work! Can someone help me? Where can I find the real driver? Thanks in advance. Chris

  • No access to the options of party on Xbox 1

    On Xbox 1 that cannot access the part or anything to do with my list of friends, that is the message at all so is not not able to make contact with them another way or play with them, help? Also with the category, as there is no option for the consol

  • BlackBerry Smartphones fb fullscreen caller I had does not work

    Hi experts, I downloaded the appellant to fullscreen fb I had app and it contacts during synchronization, it showing the error msg. SuccessSECURITY WARNING: Thank you for treating the above URL as you would your password and don't share it with anyon

  • Smartphones blackBerry locked to the network abroad

    Hi have a unlocked backberry "BOLD" Since work in Romania, it has decided to register as a local handset and my UK sim original works. It is the second "BOLD" BB happened this hs? How can get to sign up to the correct network. tried all the tricks of