How to use bind variable to update the DB 11 GR 2 access data

Hello Experts,

By DB version 11 GR 2

Operating system Windows Server 2012 - 64 bit

I want to update some data base record Access to oracle with database link. Here is my SQL, which works.

UPDATE Transaction@DB_LINK
SET "WorkCode"=1
WHERE "WorkCode"=0; 

But, I need to change that to

UPDATE Transaction@DB_LINK
SET "WorkCode"=1
WHERE "DateTime"=:VARIABLE_DATE_TIME; 

and a 2nd does not.

Any code help or example?

Ask2Learn

Hello

Use DBMS_HS_PASSTHROUGH

try something of

DECLARE
  c       BINARY_INTEGER;
  nr      NUMBER;
BEGIN

  c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@DB_LINK;

  DBMS_HS_PASSTHROUGH.PARSE@ATTD_ENVOYF(c,'UPDATE Transaction@ATTD_ENVOYF SET "WorkCode"=1
  where "DateTime" = '||''||VARIABLE_DATE_TIME||'');
  nr:=DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@DB_LINK(c);
  DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@DB_LINK(c);

END;

Hope this helps

Hamid

Tags: Database

Similar Questions

  • Satellite A210 - 16G (PSAELE) - how to use 4 GB and update the BIOS?

    Hello! I hope someone can answer a few questions for me.

    First of all is: How can I turn on my laptop to use all the 4 GB of RAM? OS is Win Vista Ultimate 32-bit with Service Pack 2. Now Vista all show the 4 GB of RAM, but don't use it. I activated the EAP in Vista, but still nothing. As I saw, I need to turn it on too memory remapping in BIOS but there is no option (my BIOS is ver.1.70).

    The second question relates to the BIOS. Because my version is 1.70 and there are more recent version 2.00; I get benefits if I update to BIOS? Someone has updated to version 2.00? And there are more options in the BIOS after update to version 2.00 (for example the memory remapping or a similar option)?
    I'm a little afraid to update BIOS, because sometimes my Toshiba freezes, and I would not hang during the update of the BIOS.

    And the final question is there any changelog to the BIOS? So I can see what is added and changed, and what's new in the new version of the BIOS. Because I could not find anywhere.

    Thanks for the responses to come.

    Hello!

    (1) you can use the entire 4 GB of RAM on a 32 bit OS. It is a due limitation of 32-bit technology. Windows Vista with Service Pack 2 may recognize the full 4 GB of RAM but not use it, more than 3.2 g.
    Here you can find more information about this limitation:
    http://APS2.toshiba-tro.de/KB0/TSB82022E0000R01.htm

    (2) about BIOS updated I can tell only must be made only if you have problems with the laptop. A BIOS update should never be done just for fun, because it of still a little risky. In the worst case, you can destroy the ROM module or complete motherboard.
    Update the BIOS doesn't normally contain new features or options. It s bug just setting. In addition it can t solve the problem with 4 GB of RAM and Vista 32 bit if you think that ;)
    If your laptop does not have 100% stable you shouldn't t update because it s too risky. Before the update, you should try to solve the problem of gel.

    (3) If a change log is available you can find it on the Toshiba site. If you can t find, there isn t available.
    That s all about this.

    I hope I could help a bit.

    Good bye

  • How to use a variable to specify the color when you set an attribute

    Hello

    We use BI Publisher (OPE) embedded in the e-Business Suite. So we are actually on version 5.6.3.

    I'd like to conditionally set the cell background color attribute in a table by using a variable reference. something like this (the sense in which I tried):

    <? attribute@InContext:background-color;$exEmpBGColor? >
    <? attribute@InContext:background-color;' {$exEmpBGColor}'? >

    The 'standard' to do this way:
    <? attribute@InContext:background-color; '#CCCCFF'? >

    Can someone please help? (i.e. is it even possible?)

    http://winrichman.blogspot.com/2008/09/how-to-set-dynamic-color-based-on-XML.html

    http://winrichman.blogspot.com/search/label/formatting

    http://winrichman.blogspot.com/2009/09/column-formatting.html

  • How to use a variable to browse the XML data

    My chart has xml data that looks like this:

    < getViewResponse >

    < getViewResult >

    < DocumentElement >

    < ColumnChart >

    < month >

    "Dec".

    < NetIncome >

    1000

    < ColumnChart >

    etc.

    etc.

    the following lines in actionscript work perfectly for the table:

    resultxml = event.result.getViewResult.DocumentElement.ColumnChart as XMLList

    chart data provider

    _chartDP = new XMLListCollection (resultxml);

    The last argument of Colum graphic in DocumentElement.ColumnChart will change. I want to make this variable instead.

    I tried DocumentElement +'. ' + this. [ColumnChart] but I get an error telling me that the property does not exist.

    The following almost works:

    event.result.getViewWithTitlesResult.DocumentElement. *.

    but my card has a series of additional data empty.

    How can I adjust the latter to a variable?

    If the data that currently say you XMLList has a single point, just cast to XML with XML (myXMLLIST) or "myXMLLIST in Xml format.

    If this post answers your question or assistance, please mark it as such.

  • Using bind variable to allow the user the place where complete clause.

    Hello

    I have a question like that I am able to run in SQL_Developer:
    SELECT INITCAP(c.name) AS "Species Name"
         , AVG(b.height) AS "Avg Height (m)"
      FROM smt_plot_index a
         , smt_photo_plot_data b
         , smt_species_names c
     WHERE a.plot_id = b.plot_id
       AND b.species_name_id = c.species_name_id
       AND a.plot_id IN (2473201,2473202)
     GROUP BY c.name
    But I'd like to do the following in an apex application:
    SELECT INITCAP(c.name) AS "Species Name"
         , AVG(b.height) AS "Avg Height (m)"
      FROM smt_plot_index a
         , smt_photo_plot_data b
         , smt_species_names c
     WHERE a.plot_id = b.plot_id
       AND b.species_name_id = c.species_name_id
       AND a.plot_id IN ( :P11_ENTER_PLOT_NUMBERS )
     GROUP BY c.name
    But this returns an error:

    error report:
    ORA-01722: invalid number

    I know that if I included only one number for example 2473201 in the element: P11_ENTER_PLOT_NUMBERS it market, but if I try and enter the following text in the element 2473201,2473202 it does not work. The screen session state, said that the value of the item is correct depending on how I entered it.

    Anyone have any solutions for this?
    Thank you
    Ben

    Published by: Benton on May 6, 2010 13:54

    Very strange... read the whole message again, there is already something, you should change: INSTR (': ' |: P11_ENTER_PLOT_NUMBERS |': ',' :'|| a.plot_id |': ') > 0 use INSTR ("," |: P11_ENTER_PLOT_NUMBERS |) ',', ',' || a.plot_id | ', ') > 0

    When you use one as a separator instead of:

    You can try to run in the SQL Developer and see how it works?
    If it works, then you would look in session state to see what values are actually used.

    I tried with BLAKE as a value in P1_TEST and that seems to work:
    Select *.
    WCP
    where INSTR (': ' |: P1_TEST |': ',' :'||) Ename |': ') > 0

    Hope that helps,
    Dimitri

  • How to use a variable out of the nested &lt; fx:component &gt; tag?

    Hi flex community.

    I'm trying to reach the House of the label of the component variables. But I am still getting this error when I press the button:

    Error #1009: Cannot access a property or method of a null object reference.

    Here is my code:

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:fx s:WindowedApplication ' http://ns.Adobe.com/MXML/2009 "
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx" >
    < fx:Script >
    <! [CDATA]

    private var newWindow:MyNativeWindow;
    public var home: String = "wooden house";

    private function openNewWindow (): void {}
    If (newWindow! = null) newWindow.close ();
    newWindow = new MyNativeWindow();
    newWindow.width = 200;
    newWindow.height = 200;

    Try
    {
    newWindow.open ();
    }
    catch (err: error)
    {
    trace (Err.message);
    }
    }

    []] >
    < / fx:Script >

    < fx:Declarations >
    < fx:Component className = "MyNativeWindow" >
    < mx:Window horizontalAlign = "center" verticalAlign = "middle" backgroundColor = "blue" >
    < fx:Script >
    <! [CDATA]
    protected function button1_clickHandler(event:MouseEvent):void
    {
    trace (outerDocument.House);
    }
    []] >
    < / fx:Script >
    < mx:Button label = "yes" click = "button1_clickHandler (event)" / > "
    < mx:Button label = "close" click = "this.close ()" / >
    < / mx:Window >
    < / fx:Component >
    < / fx:Declarations >

    < s:VGroup horizontalCenter = "0" top = "10" >
    < s:Button label = "open a new fenΩtre" color = "black" click = "openNewWindow ()" / >
    < / s:VGroup >
    < / s:WindowedApplication >

    Import mx.core.FlexGlobals;

    protected function button1_clickHandler(event:MouseEvent):void

    {

    trace (FlexGlobals.topLevelApplication.House);

    }

    now?

  • Correct way to use Bind variables when you use an interface to MS SQL Server

    Hey,.
    I have some difficulty to find how to use bind variables in a view, when you use an interface to MS SQL Server. For some reason when I use an ApplicationModule who has a library of MS SQL Server JDBC loaded and I try to click on OK when you change the following query:

    SELECT kit_status, component_id
    OF numbered_inv
    WHERE trialname =: 1

    I get an error stating that ' SQL Query Error Message incorrect syntax near ':'. JDeveloper is compatible with SQL server for bind variable as this query works fine if I replace the: 1 with a Word to say "Test test".

    Thanks in advance

    Edited by: NullCheck December 15, 2010 14:06

    Use positional JDBC Style Binding to bind variables
    Try to use? Instead of:
    As shown here:
    http://www.Oracle.com/technetwork/developer-tools/jdev/multidatabaseapp-085183.html

  • Using Bind Variable in a SELECT statement

    Hello

    I am trying to build my SQL query running using bind variables and in Oracle® Fusion Middleware Fusion developer Guide for Oracle Application Development Framework 11 g Release 1 (11.1.1) it is said that ' after you define bind variables, the next step is to reference them in the SQL statement. While SQL syntax allows you to bind variables to appear in the SELECT list and in the WHERE clause, you'll generally use them in this context, as part of your WHERE clause. ».

    However, when I try to use bind variables in my SELECT list because I had set a type to the string of the variable variable is inserted with quotes each side for example SELECT TestTable FROM 'Service '. Is it possible to use bind variables to insert a value in my list of selection without the quotes around it?

    Thanks in advance,
    Tom

    Hi Robinst,

    I think you want to set up column name of the table that is not possible using bind variables. With the help of the bind variables you can send a value to the SQL. The String value is therefore always with inverted commas.

    Kind regards

    Branislav

  • Use a script to update the MaxL substitution variables

    We use the Essbase 11.1.1 version. Can we use MaxL script for updating the substitution variables rather than using the EAS web console? We want to put the MaxL script in a batch file and plan its Windows scheduled task.

    Thanks for your help!

    Hello-

    Yes. Here is an example of script maxl-

    connection "Hypadmin" "#" on myessbaseserver.
    spool to 'mymaxl.log ';

    / * Definition of the substitution variable * /.
    ALTER database appname.databasename set variable "CurMonth" "August";

    variable display;

    spool off;
    Disconnection;
    Exit;

    You can call this maxl from a batch file at the request of windows scheduled task.

    Concerning

  • Estimate of poor cardinality using Bind Variables

    Hi I'm using the 11.2.0.4.0 Oracle version. I have a query that is underway for the plan of the poor execution by the estimate of poor cardinality for two tables (I've extracted and published this part only) as I mentioned below, the individual conditions for which the estimate goes bad and moving entire query execution path.

    These are for two tables and currently we use BIND variable for them in our code, and I notice, its best estimate gives with literals. I need to know how to handle this scenario that I need this query to execute for all types of volumes. Is there something I can do without changing the code, as it works well for most of the execution? In the current scenario of the main query that uses those below tables providing a plan (index + nested loop) that works very well for small volume, but running for 10 hr + for large volume as ideally its going to the same regime.
    And Yes, most time that this request will be hit for small volume, but killing some appearance of large volume presents the performance of the queries.


    Here are the values of the variable binding.

    B1 VARIABLE VARCHAR2 (32);
    B2 VARIABLE VARCHAR2 (32);
    B3 VARIABLE NUMBER;
    B4 VARIABLE VARCHAR2 (32);
    B7 VARIABLE VARCHAR2 (32);
    B5 VARIABLE NUMBER;
    B6 VARIABLE NUMBER;

    EXEC: B1: = 'NONE ';
    EXEC: B2: = NULL;
    EXEC: B3: = 0;
    EXEC: B4: = NULL;
    EXEC: B7: = NULL;
    EXEC: B5: = 0;
    EXEC: B6: = 0;

    ---- For  TABLE1-------
     -- Published Actual VS Etimated cardinality
     
     
    -- With bind values
    select * from TABLE1 SF
    WHERE (   (SF.C1_IDCODE = :B4) OR (NVL (:B4, 'NONE') = 'NONE'))
        AND ( (SF.C2_ID = :B3) OR (NVL (:B3, 0) = 0));
    Plan hash value: 2590266031
    -----------------------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation                 | Name                | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |  OMem |  1Mem | Used-Mem |
    -----------------------------------------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT          |                     |      1 |        |  28835 |00:00:00.08 |    2748 |     46 |       |       |          |
    |*  1 |  TABLE ACCESS STORAGE FULL| TABLE1              |      1 |     11 |  28835 |00:00:00.08 |    2748 |     46 |  1025K|  1025K|          |
    -----------------------------------------------------------------------------------------------------------------------------------------------
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       1 - storage((("SF"."C1_IDCODE"=:B4 OR NVL(:B4,'NONE')='NONE') AND ("SF"."C2_ID"=:B3 OR NVL(:B3,0)=0)))
           filter((("SF"."C1_IDCODE"=:B4 OR NVL(:B4,'NONE')='NONE') AND ("SF"."C2_ID"=:B3 OR NVL(:B3,0)=0))) 
     
    -- With literals 
    select * from TABLE1 SF
     WHERE  (   (SF.C1_IDCODE = null) OR (NVL (null, 'NONE') = 'NONE'))
          AND ( (SF.C2_ID = 0) OR (NVL (0, 0) = 0));
       Plan hash value: 2590266031
    --------------------------------------------------------------------------------------------------------------------------------------
    | Id  | Operation                 | Name                | Starts | E-Rows | A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    --------------------------------------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT          |                     |      1 |        |  28835 |00:00:00.03 |    2748 |       |       |          |
    |   1 |  TABLE ACCESS STORAGE FULL| TABLE1              |      1 |  28835 |  28835 |00:00:00.03 |    2748 |  1025K|  1025K|          |
    --------------------------------------------------------------------------------------------------------------------------------------
    
    --------For TABLE2 ----------------------- 
    -- Published Autotrace plan, as it was taking long time for completion, and actual cardinality is 45M, but its estimating 49 With bind value---
    
    --withbind value
    select * from TABLE2 MTF
    WHERE (   (MTF.C6_CODE = TRIM (:B2)) OR (NVL (:B2, 'NONE') = 'NONE'))
      AND (   (MTF.C3_CODE = :B1)  OR (NVL (:B1, 'NONE') = 'NONE'))
      AND (   (MTF.C4_CODE = :B7)  OR (:B7 IS NULL))
      AND (   (MTF.C5_AMT <= :B6)  OR (NVL (:B6, 0) = 0))
      AND (   (MTF.C5_AMT >= :B5)  OR (NVL (:B5, 0) = 0));
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1536592532
    -----------------------------------------------------------------------------------------------------------
    | Id  | Operation                  | Name         | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    -----------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT           |              |    49 | 10437 |   358K  (1)| 01:11:43 |       |    |
    |   1 |  PARTITION RANGE ALL       |              |    49 | 10437 |   358K  (1)| 01:11:43 |     1 |  2 |
    |*  2 |   TABLE ACCESS STORAGE FULL| TABLE2       |    49 | 10437 |   358K  (1)| 01:11:43 |     1 |  2 |
    -----------------------------------------------------------------------------------------------------------
    Predicate Information (identified by operation id):
    ---------------------------------------------------
       2 - storage(("MTF"."C4_CODE"=:B7 OR :B7 IS NULL) AND ("MTF"."C3_CODE"=:B1 OR
                  NVL(:B1,'NONE')='NONE') AND ("MTF"."C5_AMT"<=TO_NUMBER(:B6) OR NVL(:B6,0)=0) AND
                  ("MTF"."C5_AMT">=TO_NUMBER(:B5) OR NVL(:B5,0)=0) AND ("MTF"."C6_CODE"=TRIM(:B2) OR
                  NVL(:B2,'NONE')='NONE'))
           filter(("MTF"."C4_CODE"=:B7 OR :B7 IS NULL) AND ("MTF"."C3_CODE"=:B1 OR
                  NVL(:B1,'NONE')='NONE') AND ("MTF"."C5_AMT"<=TO_NUMBER(:B6) OR NVL(:B6,0)=0) AND
                  ("MTF"."C5_AMT">=TO_NUMBER(:B5) OR NVL(:B5,0)=0) AND ("MTF"."C6_CODE"=TRIM(:B2) OR
                  NVL(:B2,'NONE')='NONE'))
      
    -- with literal
    select * from TABLE2 MTF
    WHERE (   (MTF.C6_CODE = TRIM (null)) OR (NVL (null, 'NONE') = 'NONE'))
     AND (   (MTF.C3_CODE = 'NONE') OR (NVL ('NONE', 'NONE') = 'NONE'))
      AND (   (MTF.C4_CODE = null)  OR (null IS NULL))
       AND (   (MTF.C5_AMT <= 0)  OR (NVL (0, 0) = 0))
      AND (   (MTF.C5_AMT >= 0)  OR (NVL (0, 0) = 0));
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1536592532
    -----------------------------------------------------------------------------------------------------------
    | Id  | Operation                  | Name         | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    -----------------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT           |              |    45M|  9151M|   358K  (1)| 01:11:41 |       |    |
    |   1 |  PARTITION RANGE ALL       |              |    45M|  9151M|   358K  (1)| 01:11:41 |     1 |  2 |
    |   2 |   TABLE ACCESS STORAGE FULL| TABLE2 |    45M|  9151M|   358K  (1)| 01:11:41 |     1 |  2 |
    -----------------------------------------------------------------------------------------------------------
    
    select column_name,num_nulls,num_distinct,density
    from dba_tab_col_statistics where table_name='TABLE2'
    and column_name in ('C3_CODE','C4_CODE','C5_AMT','C6_CODE');
    C3_CODE 0 65 0.0153846153846154
    C4_CODE 0 2 0.5
    C5_AMT 0 21544 4.64166357222429E-5
    C6_CODE 1889955 71 0.0140845070422535
    
    

    933257 wrote:

    ((SF. C1_IDCODE =: B4) OR (NVL (: B4, 'NONE') = 'NONE'))

    In fact for literals, I did not find any section of the predicate after running the sql code with activation "set autotrace traceonly explain."

    The main problem is with another large query whose cardinality is underestimated due to the presence of these table (table1, table2) with the above mentioned clause, and the query is for the analysis of index + nested with values of Bind loops and take 10 hr +, whereas with literals, its completion in ~ 8minutes with FTS + Hash Join.

    Your real problem is that you try to have just a single SQL query handle all POSSIBLE thanks to the use of embedded FILTERS ' either / or ' filters in the WHERE clause.  You want only a select this OPTION to run whatever filters have been selected at run time by the user or the application using it.  And it would never work.  You really need to SELECT different queries for different combinations of filter conditions.

    Why?  Think for a minute.  How Oracle works internally?  A SQL SELECT query gets analyzed and an execution plan is produced which is stored in the library cache and gets REUSED on all subsequent executions of this query - except in certain cases where there may exist several plans run through several cursors of the child.  So with only SELECT a query you only AN execution plan in the library cache, to be used by all THE executions of this query, regardless of the value of your run-time binding variables.

    Lets put another way - each library cache execution plan is associated with a SQL statement.  If you want a DIFFERENT execution plan then you need run a DIFFERENT SQL statement.  That's how you get a different execution plan - by running a different SQL statement.  Running the SAME SQL query generally you will get the SAME execution plan every time.

    In addition, because of the "either / or" filters that you use you will end up generally with a full Table Scan on each of the referenced tables.  Why?  Given that the optimizer must produce an implementation plan that manages all possible contingencies for all values of possible bind variables in the SELECT.  If the optimizer should choose to use any index based on one of these "either / or" filters then it would only help performance when real value was provided, but it would be really bad if a NULL value was supplied.  If the optimizer ends up ignoring the index because they are not always optimal for all possible input values and instead chose a plan that is "good enough" for all input values possible.  That means that it will use a scanning Table full.

    I hope you can see that it is precisely what is happening for you with your query.  You select this OPTION to manage the different combinations of filter, which leads to the execution plan only one, which leads to scans full Table on the referenced tables in these ' either / or ' filters.

    The solution?  Build queries SELECT DIFFERENT when input values are NULL.  How you do that?  Read this article to ask Tom that tells you:

    http://www.Oracle.com/technetwork/issue-archive/2009/09-Jul/o49asktom-090487.html

    To sum up - when you have real value for a bind variable 'bind_var1' add the following filter to your CHOICE:

    AND column_name1 =: bind_var1

    When the binding variable is NULL, add the filter according to your CHOICE:

    AND (1 = 1 OR: bind_var1 IS NULL)

    Now, you'll have 2 queries SELECT must be performed, which have exactly the same number of variables in the same order bind, which is important.  When you then run one of these variations, Oracle can analyze and optimize each one SEPARATELY, with a single execution by the SELECT query plan.

    When you provide a real value, the filter is a normal 'column = value' that the optimizer can use all indexes on this column, because NULL values are not referenced.

    When there is no real value, the optimizer will analyze the '1 = 1 GOLD' and realize that "1 = 1" is set to TRUE and GOLD, it is quite TRUE regardless because the binding variable is null or not.  This means that the optimizer will actually REMOVE this filter, because it filters nothing because it is always TRUE.  You will end up with an operating plan based on the other filters in the query, which is what you want because you have no filter on this column.

    What is it - producing distinct SELECT queries to determine if you have a real value to filter or not you end up with DIFFERENT execution plans for each of them, and each of them is OPTIMAL for this particular set of filters.  Now you get good performance for each variation of the performance of the SELECTION, rather than sometimes good and sometimes very bad when using SELECT only one.  It is impossible to try to get multiple shots of execution 'optimal' out of a SELECT query.  That's why you get mediocre performance under different bound the values of the variables.

    John Brady

  • APEX 4.0: &gt; Charts: chart of queries using Bind variables &gt; does not?

    SITUATION
    -Attempt to pass a value to the variable in a query.
    -The value of the variable is taken from a page element.
    -SQL is built using a function that returns the SQL


    QUESTION
    -Table returns "no data found".
    -When we hard code the value, the data is returned and the graphic works.
    -SQL works fine in SQL Browser and Toad
    -Reproduce this problem on 3.2
    -Have you tried the two bind syntax (+: point +) and v (v ('item')) syntax

    If anyone else has experienced this? No idea how to fix?

    Walter,

    Perhaps a better way to get the logic you are looking for is to keep it in the process.

    A few examples:
    1. you can use the conditional rendering process so that it fires only when the values of the elements are NULL.
    2. you can use the conditional process rendering so that it fires when the value of the claim is equal to something and then set it via the link to the page.
    3. you can do it directly in the code:

    BEGIN
    
       IF :P2_ITEM IS NULL
       THEN
          :P2_ITEM := 'Some default value';
       END IF;
    
    END; 
    

    Kind regards
    Dan

    Blog: http://DanielMcGhan.us/
    Work: http://SkillBuilders.com/apex/

  • PL/SQL using bind variable to delete records

    Hello

    I'm currently implementing PL/SQL using bind variables to remove records from the "item_progress" table in the simple join query where I'm passing itemName, itemLoc and orderLoc in the delete query in pl/sql block.

    Please suggest, it should be easy for oracle experts...

    (a) I need first records in the item_progress table by using the join query and then update of status in the renew_item table.
    (b) it works fine if I use the simple removal with a condition that is ("DELETE from item_progress where itemname =: 1' using itemname1").

    (c) but it gives an error when I run it using delete with join:
    ---------------------------------------
    * Invalid relational operator ORA-00920:
    ORA-06512: at "SE", line 14 (it's the deletion with the join... "DELETE FROM item_progress WHERE item_id IN (SELECT ip.item_id'...)" ....'
    ORA-06512: at line 10
    Process exited.*
    ---------------------------------------

    create or replace PROCEDURE PUT (itemName IN VARCHAR2,
    itemLoc IN VARCHAR2,
    orderLoc IN VARCHAR2) is
    itemName1 varchar2 (30);
    itemLoc1 varchar2 (30);
    orderLoc1 varchar2 (30);
    BEGIN
    orderLoc1: = ' C: test/local /';
    itemLoc1: = ' / / L123/R;
    itemName1: = 'AAA ';

    immediate execution

    "DELETE FROM item_progress WHERE item_id IN (SELECT ip.item_id FROM ip, item_order io item_progress WHERE io.orderlocation: = 1 AND ip.order_id io.order_id UNION SELECT item_id FROM item_progress WHERE ITEMLOCATION =: = 2) AND itemname: = 3' using orderloc1, itemloc1, itemname1;"

    -"DELETE from item_progress where itemname =: 1' using itemname1; -IT WORKS FINE
    -Once the above query is updated to success, the status in another table
    -Renew_item update the Status value = "RENEWED" where ITEMNAME =: 1, ITEMLOCATION =: 2 using itemname1, itemloc1;

    commit;
    END OPERATIONS;

    user10828299 wrote:
    Please suggest, it should be easy for oracle experts...

    You have made a typo. bind variables are preceded by two points, while you put a colon in front of the equality operator that he listens to it in the PL/SQL assignment operator. Change:

    WHERE io.orderlocation : = 1

    TO

    IO.orderlocation WHERE =:1

    Change:

    WHERE ITEMLOCATION : = 2

    TO:

    WHERE ITEMLOCATION =:2

    Change

    AND itemname : = 3

    TO:

    AND itemname =:3

    SY.

  • printing problem in pdf and csv using bind variables

    Hello

    I created a simple sql statement using a query and bind variables. I noticed when I remove the bind variables and hardcode the values that the CSV/PDF links work. When I handed the return variables in the query, the WB shows "no data found" and pdf shows only the column header.

    If anyone can help me, I would be very happy!


    Thank you
    Ayed P.

    Hello

    How are set the bind variable? If there are topics evaluated by default on the elements of the page, so is not necessarily enough to ensure that the exports are their values. To set values, I tend to use calculations, conditional that the element is null, what works "Before Header". In this way, the value is stored in the session and is available for export. I think the defaults to be those that are defined when the page is submitted and are not available until now.

    Andy

  • How to use substitution variables, as in Microsoft Word using Hyperion Smart view

    Can we use the Substitution Variables to copy data points and cool off in Microsoft Word? I tried and it does not dynamically (copy the data points only copies what was in excellent cell right there). It copies only the static value of this variable for this cell. I want to use dynamically in Word so that if I change the value of this variable in Essbase, it is updated in Word on refresh. Any idea?

    We need this notification feature in microsoft word and keep using data points every year (instead of copy the cells of excellent on new)

    Any help or suggestion is appreciated.

    Thank you

    You may not use substitution variables, as with the copy data points. I tried a while back (after 111.1.2.1.102) and it wouldn't work.  I checked with Oracle development and they said that I is not available

  • How to use setViewportBounds (Bounds value) to the ScrollPane?

    How to use setViewportBounds (Bounds value) to the ScrollPane? This method is, visually, what for? I tried to put a specific Bounds.minY to have a precise scrolling in the axis Y in vain. I use the setVvalue() method to scroll, but it is not convenient to exactly locate a position in the coordinates of the node content listed in the scroll pane.

    The viewportBounds are the limits of the viewport (i.e., the visible part of the content) in the scrolling pane itself, if I understand correctly. The way to access programmatically is by setting the vValue property.

    I have not tried, but if you do something like

    scrollPane.setVmin(0);
    DoubleBinding vmax = new DoubleBinding() {
         { super.bind(scrollPane.viewportBounds(), content.heightProperty()); }
         @Override
         public double computeValue() {
            return content.getHeight() - scrollPane.getViewportBounds().getHeight() ;
         }
    };
    scrollPane.vmaxProperty().bind(vmax);
    

    to configure your component to scroll, then you can call setVvalue (...) and just pass a location of coordinates for your content node. This assumes that your content node is a region or a control; you will have to perhaps a little logic in the method computeValue() to deal with the cases where the display window is greater than the additional content.

Maybe you are looking for

  • Satellite U400 - driver Open Webcam fail

    If I try to use the webcam, I get the message: «Webcam driver open fail...» » There are several threads about this on this forum and other boards of Directors through Google, not only related to this model, well than many other Toshibas. Is there a f

  • Get Rescue and Recovery

    Lenovo Toolbox suggests get Rescue and Recovery, but ThinkVantage System Update does not offer it. How do I get it? Thank you. Jim White

  • Autorotation Duo 13 does not work.

    I almost tried everything. http://www.howtogeek.com/129732/how-to-disable-screen-rotation-in-Windows-8/ I tried all of the above in the link backwards (trying to ENABLE not disable auto rotation) She was driving me crazy. Help?

  • Change the wallpaper but missing view tab.

    I'm changing the wallpaper, but I do not have a view tab. Until I click on display in settings, this happens error loading theme "c:\documents and document\my theme.theme preferred owner is not a valid topic.

  • repeated problems with HP550 / Windows Vista SP2

    Hi all the following problems keep recurring and the help of windows update does not respond: (1) I get a reminder to register my new product - I already did. (2) Windows update - continues to not install updates correctly - whenever it starts I have