Updated between the values

Hello

Could someone help me with a very trivial problem.

I have after the update clause, but it gives the error ORA-01427. Seems that it is between the two problem. How should I change what he begins to work?

Update sales_in

the value of sale = (select a.sales in the sales_out one

where a.sales_year_month between 201501 and 201505);

Update sales_in I

the value of sale = (select a.sales in the sales_out one

where a.sales_year_month = i.sales_year_month

)

where i.sales_year_month between 201501 and 201505;

Tags: Database

Similar Questions

  • Semi colon separated between the values

    Hello

    I have a table:

    CREATE TABLE TEST_A

    (

    ATT1 VARCHAR2 (10),

    ATT2 VARCHAR2 (10),

    ATT3 VARCHAR2 (10),

    ATT4 VARCHAR2 (10));


    INSERT INTO TEST_A

    VALUES (NULL, 'A', NULL, 'B');


    INSERT INTO TEST_A

    VALUES(,'D',,'E');


    COMMIT;


    I want that the output voltage: select * from test_a as:


    A; B

    D; E


    I want a semicolon separated between the values. If the first column has no value, it must not start with a separator semicolon.


    Thank you


    SELECT a.*,

    TRIM)

    BOTH

    ';'

    OF REGEXP_REPLACE)

    Att1 | ';' ||

    att2 | ';' ||

    att3 | ';' ||

    ATT4,

    ';+',

    ';'

    )

    ) att_list

    OF test_a one

    /

    ATT1 ATT2 ATT3 ATT4 ATT_LIST
    ---------- ---------- ---------- ---------- ----------
    A                     B          A; B
    D                     E          D; E
    A                                A

    SQL >

    SY.

  • Updated if the value of the form is empty?

    Is it possible to set a value of constant only if the value of this field is empty? My goal is to put a value down to net new contacts when the original lead source value is empty (trying to understand why this always happens).

    Thank you.

    Yes, you can add a hidden form field with a static value and using "Update Contacts - with form" stage computer, map the field to lead the original source with a Type of update if empty value "Update".

  • Spaces between the values in the output

    Hi all

    I have a doubt, this is the scenario in the report.

    Try to display the names of channel which is a special category in the bottom of the report. The names are identified by the DESCR field in the <? FIELD? > tag, starting with a. (ex: A-SONY).
    But there are some other channels to come between the two, as the commercial channels. Comes it like that.
    <? FIELD? >
    <? DESCR? > A-SONY <? / DESCR? >
    <? / FIELD? >
    <? FIELD? >
    <? DESCR? > B-SPORTS <? / DESCR? >
    <? / FIELD? >
    <? FIELD? >
    <? DESCR? > A-STAR <? / DESCR? >
    <? / FIELD? >

    Now, when we display these values, it displays properly, but leaving a space between them, because it has other values in the meantime.
    Can we avoid this space?, this creates some alignment problems.

    Thanks in advance,
    Imtiaz.

    You can do it like below, so that it picks up the values beginning with 'A' alone

  • Object that can be bound but not updated when the value changes

    I have an object that is declared as [Bindable], which is updated in a component that is also declared as [Bindable] However, when the value is changed the user interface shows the change but the linked object never gets updated.

    Are there cases where related objects do not updated?

    Yes, as I said, pass the name of the property and the value in the change manager.

    Support rating allows you to set the value, not a switch statement. Some examples of code.

    Tracy

  • Error of the value of the range of the attribute only on the second update of the value each time.

    I tried to create an interface to change attributes of my camera during the acquisition. I created a cluster that has orders for BinningX & Y, cadence, exposure and position. When the VI running everything works fine except when changing the value binning more than once, I always get an error on the second attempt. The range is from 1 to 9 and at the beginning of the VI I can't change any value in this range, but if I try to change it to something else after that, even at 1, I get an error that the value is out of range. Any idea what could be the cause?

    Is attached a screenshot of part of my VI which deals with changing the values.

    Thank you!

    Change the order in which you pass in parameters. I had this problem several times.

    Indeed, if the return on investment that you describe is out of the detection area, you will get this error.

    Do not forget that the X offset + width cannot be greater than the width of the sensor and Y Offset height cannot be greater than the height sensor.

    Hope this helps

  • Updated with the values in the same table, for other records corresponding to conditions

    Hi Experts,

    Sorry do not provide the structure of the table (it is a simple structure)

    I have a requirement where I need to update the columns of a table based on the same table with some match empid and date values. If the date and empid match so I have these values to any other folder and update of one who is not having details of Office . I need the Update query

    Before the update my array of values is as below

    Sort_num Emp_id Bureau start_date

    1 101 AUS 01/01/2013
    2 101 01/01/2013
    3 101 15/01/2013
    4 103 USA 01/05/2013
    5 103 01/01/2013
    6 103 05/01/2013
    7 104 FRA 01/10/2013
    8 104 10/01/2013
    9 104 01/01/2013

    After update my table should be as below

    Sort_num Emp_id Bureau start_date

    1 101 AUS 01/01/2013
    2 101 AUS 01/01/2013
    3 101 15/01/2013
    4 103 USA 01/05/2013
    5 103 01/01/2013
    6 103 USA 01/05/2013
    7 104 FRA 01/10/2013
    8 104 FRA 01/10/2013
    9 104 01/01/2013

    Thanks in advance

    I don't have the time to create the table with the data, but basically, you should be able to code the following text

    update one table

    Office set = (select desktop in table b where b.emp_id = a.emp_id)

    and b.start_date = a.start_date

    and b.office is not null

    )

    where is ([as well as overall query])

    and a.office is null

    In my opinion, who will do the trick.

    HTH - Mark D Powell.

  • Release of updated with the value of the other Table

    Hello
    I need the sum there point TableB and insert/update this value in the X field in TableA. I can do this with select statements regular when I add values in my statement, but I'm getting errors now. Need help on how to code the trigger to do this, thank you.
    ORA-00936: lack of expression
    SELECT a.X, SUM(b.Y), 
    INTO a.X
    FROM TableA a, TableB b
    WHERE a.PK = b.FK;

    Ok. I think I understand now what's going on. Think logically that you create the customer first and only then customer can create orders, right? So when you insert a customer into the table DEMO_CUSTOMERS there is no customer order in the DEMO_ORDERS table. As a result, the CREDIT_LIMIT column remains NULL.

    SY.

  • Column of child binding between the values of the parent record

    I know it is not a declarative constraint to do, but I wonder what ideas have for the best model to use.

    I have a table parent ALPHA with columns ALPHA_ID, start_date and end_date.
    Then I have a BETA child table with columns BETA_ID, ALPHA_ID, and TRAN_DATE.

    I would like to limit this BETA. TRAN_DATE is located between ALPHA. Start_date and ALPHA. End_date I hesitate to use a trigger because BETA will be many inserts.

    I looked at the creation of an ALPHA_DATE table with the columns TRAN_DATE, ALPHA_ID, start_date and end_date, with the first three columns as foreign key the same columns in ALPHA, and a CHECK constraint that (TRAN_DATE between start_date and end_date), then leave BETA (ALPHA_ID, TRAN_DATE) be a foreign key for ALPHA_DATE (ALPHA_ID TRAN_DATE).

    Thank you
    Matt

    Personally I would generate just triggers for it. And see if the drop in performance may be taken.

    Of course, in Oracle14 (or more?) you can do:

    create assertion alpha_beta_date_constraint
    check(not exists
    (select 'tuple in this join'
     from alpha a
         ,beta b
     where a.alpha_id = b.alpha_id
        and not (b.tran_date between a.start_date and a.end_date)
    ))
    /
    

    You can also use the infamous thing materialized view.
    -Create a MV that's bassically by using the query above to search for the faulty lines.
    -Add a check on this MV constraint which is always false (for example, check (0 = 1)).
    -Do a refresh on the validation of MV type.

  • update of the value entered in the report to the table item

    Hi all


    I want to change the dnom report... and wt never dept I checked shud update the db...



    I've created a report in the

    Select apex_item.checkbox(1,deptno) "Select", apex_item.text(2,dname) "dname" of the Department;


    and submitt I m writing a process as


    Start
    BECAUSE me IN 1.APEX_APPLICATION. G_F01. COUNTY
    loop
    update the set dname = apex_application dept. G_F02 (i) where deptno = apex_application. G_F01 (i);

    -I want to update the text entered in the table report.
    commit;
    end loop;
    end;

    Hello

    You get an error? Or how it will not work?

    BR, Jari

  • difference between the values in the adjacent table.

    Hello

    I want to subtract from the adjacent elements in a table. I mean 1 element element-2e, 2-3, 3-4, 4-5 and so on... I HAV searchd for array index handling rem. but dint get... Help me. Thanks in advance

    Hi n,

    as easy as this:

  • Problem of correspondence between the values in a table

    I have a table of product

    Qty of level type ID Grp
    ABC 101 1 1 100
    101 80 1 2 ABC
    101 3 1 65 ABC
    ABC 101 1 2 45
    ABC 101 2 2 100
    101 3 2 10 ABC

    Here, I need to check if the level (id.grp), type = 2 present in type 1 and type 2 = quantity is greater than 40% of the quantity of type = 1

    Finally, we should get

    Qty of level type ID Grp
    ABC 101 1 2 45 (more than 40% of 100)
    ABC 101 2 2 100 (more than 40% of 80)

    Please help me

    Thanks in advance
    SELECT *
      FROM product p1
     WHERE p1.TYPE = 2
       AND p1.qty > (SELECT MIN (p2.qty * 40 / 100)
                       FROM product p2
                      WHERE p1.id = p2.id
                        AND p1.grp = p2.grp
                        AND p1.level_ = p2.level_
                        AND p2.TYPE = 1
                    )
    

    Kind regards
    Vijay

    Published by: Vijaya Sekhar Reddy P on November 18, 2009 18:03
    Changed MAX and MIN

  • publish in the application of updates of the value of database Patch (UAP)

    Hi all

    I am applying Patch 8576156 to 10.2.0.4 on AIX 5L. I am referring to the README file for even where section Post installation instructions say
    Recompilation of the views in the database
    --------------------------------------------------------
    "Run the script to view recompilation. Note that this script is run with the database upgrade mode, which limits connections such as SYSDBA.

    CD $ORACLE_HOME/cpu/view_recompile
    sqlplus/nolog
    SQL > CONNECT / AS SYSDBA
    SQL > SHUTDOWN IMMEDIATE
    SQL > STARTUP UPGRADE
    SQL > @view_recompile_jan2008cpu.sql
    SQL > SHUTDOWN;
    SQL > STARTUP;
    SQL > QUIT

    --------------------------------------------------------

    the problem here is, I can't find any directory with the name 'cpu' in my ORACLE_HOME
    CD $ORACLE_HOME/cpu/view_recompile
    bash: cd: /u01/app/oracle/product/10.2.0/cpu/view_recompile: no such file or directory

    As I am new to Oracle, any help on this would be much appreciated.

    ARS says:
    Thank you for your quick reply.you mean, required by 'cpu' directory would be created after the application of the modified binary files?

    Yes, it should.

    No, I have not applied the modified binary files and yet I'm going in the README file to estimate downtime and prepare the tabling action.

    Don't forget to apply it in a test env first before making the abything on your prod.

    Nicolas.

  • channel and sampling rate is not updated until the next cycle

    Hi all

    I'm new to LabVIEW and I wrote the code for the measurement of temperature using the cDAQ-9178 or NI 9214. Could someone please look at my code and help me understand why... my names channel to sample and rate update, until the next time I run my program.

    For example: if I enter the name of the channel "ONE" and "10" sampling frequency... and draw my program will be executed using previous information entered by the user. If I press the race a second time, then it will use the '10' sample rate and channel "ONE". Everyone can't see what I did wrong? I know that my code is absent, but she does everything that I need, except for the update.

    I really want to use a structure of the event, but failed miserably in my attempts. Thank you

    Stream.  Updates the values in your Subvi are run in parallel to the Structures of your event.  The simple solution is to simply put your update of the values inside the event.  In this way the controls are not read until you actually press the next button.

  • Is there an easy way to filter a 2D table based on the values in two fields?

    Y at - it an easy way to filter a 2D table based on the values of one of the fields. In my attached VI the output array has the following format:

    Ident Frame Type bytes TimeStamp data

    10:57:07.621 3AD00016 POUVEZ 8 0000000000000000 data frame

    10:57:07.622 3AD00017 CAN data frame 8 000005E000000000

    10:57:07.624 3AD00018 POUVEZ 8 0000000003300000 data frame

    10:57:07.625 2DC00000 POUVEZ 8 0000000000000000 data frame

    10:57:07.626 3AD00019 POUVEZ 4 0000030000000000 data frame

    I would like to delete all lines that do not have an "Ident" between the values of 3AD00000 and 3AD0001E. So for the data above the fourth row would be removed. The only way I can see to do this is to form a 1 d table. Is there a better approach?

    Thank you.

    Hi chuck72352,

    After you've sorted your data, you can use the function InRange. Combined with a "search in 1 table D", you get the range you really want.

    Mike

Maybe you are looking for