UPDATE Query with logic applied

Hi Experts,
I need your help for now. Here is my requirement,
BANNER                                                                         
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production         
PL/SQL Release 11.1.0.7.0 - Production                                         
CORE     11.1.0.7.0     Production                                                     
TNS for 32-bit Windows: Version 11.1.0.7.0 - Production                        
NLSRTL Version 11.1.0.7.0 - Production                                         
5 rows selected.
DROP TABLE LINE_STATUS;
DROP TABLE LINE_CHILD;
CREATE TABLE LINE_STATUS
    LINE_ID     INTEGER     NOT NULL PRIMARY KEY,
    LINE_AMT    FLOAT,
    LINE_FLAG   INTEGER
INSERT INTO LINE_STATUS VALUES(1,1.52,0);
INSERT INTO LINE_STATUS VALUES(2,1.06,0);
INSERT INTO LINE_STATUS VALUES(3,2.05,0);
CREATE TABLE LINE_CHILD
    LINECHILD_ID        INTEGER NOT NULL PRIMARY KEY,
    LINECHILD_LINEID    INTEGER NOT NULL,
    LINECHILD_AMT       FLOAT
INSERT INTO LINE_CHILD VALUES (100,1,0.50);
INSERT INTO LINE_CHILD VALUES (101,1,0.50);
INSERT INTO LINE_CHILD VALUES (102,2,1.00);
INSERT INTO LINE_CHILD VALUES (103,2,0.05);NOW I NEED TO COLLECT THE SUM OF LINECHILD_AMT FOR EVERY LINECHILD_LINEID REFER LINE_STATUS(LINE_ID) AND TO CHECK
THE VALUES ARE SAME, THERE CAN BE DIFFERENCE 0.01 THEN TO UPDATE LINE_STATUS(LINE_FLAG) VALUE.
For Example:
SELECT SUM(LINECHILD_AMT) FROM LINE_CHILD WHERE LINECHILD_LINEID=1
Result is 1,
CASE
    WHEN LINE_STATUS(LINE_AMT)!=SUM(LINECHILD_AMT) THEN 2
    WHEN LINE_STATUS(LINE_AMT) =(LINE_STATUS(LINE_AMT)<=-0.01 OR LINE_STATUS(LINE_AMT)>=0.01 THEN 1
END CASE <<RESULT>>UPDATE LINE_STATUS,LINE_CHILD SET LINE_FLAG = CASE <<RESULT>> WHERE LINECHILD_LINEID= LINE_ID;
How can i achieve this ?
Thanks,

This may not be the exact requirement as per as values of CASE statement is concern, but it should serve your purpose.
SQL> select * from LINE_STATUS;
   LINE_ID   LINE_AMT  LINE_FLAG
         1       1.52          0
         2       1.06          0
         3       2.05          0
SQL> SELECT * FROM  LINE_CHILD;
LINECHILD_ID LINECHILD_LINEID LINECHILD_AMT
         100                1            .5
         101                1            .5
         102                2             1
         103                2           .05
SQL> ed
Wrote file afiedt.buf
  1  UPDATE LINE_STATUS
  2  SET LINE_FLAG=( WITH Sum_Line_Status AS ( SELECT LINE_ID S_LINE_ID,SUM(LINE_AMT) LINE_AMT_SUM
  3                                            FROM LINE_STATUS
  4                                            GROUP BY LINE_ID
  5                                          )
  6                  ,Sum_LINE_CHILD AS ( SELECT LINECHILD_LINEID S_LINECHILD_LINEID,
  7                                       SUM(LINECHILD_AMT) LINECHILD_AMT_SUM
  8                                       FROM LINE_CHILD
  9                                       GROUP BY  LINECHILD_LINEID
10                                     )
11                    SELECT
12                       CASE WHEN ABS(LINE_AMT_SUM-LINECHILD_AMT_SUM)>0.01 THEN 2
13                            WHEN LINE_AMT_SUM=LINECHILD_AMT_SUM THEN 1
14                            WHEN ABS(LINE_AMT_SUM-LINECHILD_AMT_SUM)<=0.01 THEN 3
15                       END
16                    FROM   Sum_Line_Status,Sum_LINE_CHILD
17                    WHERE  S_LINE_ID=S_LINECHILD_LINEID
18                    AND  S_LINE_ID=LINE_ID
19*                   )
20  /
3 rows updated.
SQL> SELECT * FROM  LINE_STATUS;
   LINE_ID   LINE_AMT  LINE_FLAG
         1       1.52          2
         2       1.06          3
         3       2.05

Similar Messages

  • Update query with CL_SQL_STATEMENT class

    Hi all,
    I'm trying to execute an update query with ADBC classes in order to modify two parameters (n_doc and processed) from a row with the following instructions:
          l_con_ref = cl_sql_connection=>get_connection( 'DB_7879' ).
          l_stmt_ref = l_con_ref->create_statement( ).
         CONCATENATE 'update' gv_table ' set n_doc= ? processed = ''X'' where id_ordn = ? '  INTO l_stmt SEPARATED BY space.
          GET REFERENCE OF materialdocument INTO l_dref.
          l_stmt_ref->set_param( l_dref ).
          GET REFERENCE OF ps_zmm_mov-id_ordn INTO l_dref.
          l_stmt_ref->set_param( l_dref ).
          l_stmt_ref->execute_update( l_stmt ).
    However, I got the error ORA-0933: SQL command not properly ended. I guess this error occurs because I am trying to update two parameters with a single query since using the following CONCATENATE instruction
         CONCATENATE 'update' gv_table ' set n_doc= ? where id_ordn = ? '  INTO l_stmt SEPARATED BY space.
    results ok.
    Does anybody know if it is possible to modify two parameters with only one update query with ADBC classes?
    Thank you in advance!

    Hi Suhas,
    Based on Oracle, I see it conforms almost completely ISO/IEC 9075 ([Oracle and Standard SQL|http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/ap_standard_sql.htm#10293])
    UPDATE seems to conform completely [UPDATE SET clause|http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_108a.htm#2087215]
    So using a comma to separate columns is true for every SQL language that conforms ISO/IEC 9075
    Sandra
    PS: of course SAP's "Open SQL" language does not conform at all

  • Update query with prompt to input percentage

    Hi I'm just starting out with Access I need to do an update query with a prompt asking the user to enter a percentage this what i have done "ProdSellPrice+ProdSellPrice *[Enter a Percentage] and I've all so done this "[ProdSellPrice]+[ProdSellPrice]
    *[Enter a Percentage]" but still not working.

    The expression to add a percentage to a value is v*(1+(p/100)) where v is the value and p is the percentage. e.g. in the debug window:
    v = 52
    p= 10
    ? v *(1+(p/100))
     57.2
    So the SQL statement would be:
    UPDATE  tblProduct
    SET ProdSellPrice = ProdSellPrice * (1+([Enter a Percentage]/100));
    Ken Sheridan, Stafford, England

  • Problem for running Update query with Chinese

    Hi all,
    I am running a web application in Lotus Domino.
    I have a Lotus Script Agent which need to update Oracle 8i Database with Chinese Character throught ODBC but i find that all characters become some strange characters.
    I got the problem only for update query.
    I have no problem for select query for getting the chinese data.
    Also, I got no problem to run the update query with chinese characters in Sqlplus.
    I also try to run the same update query which the ODBC connection is pointing to an MS Access Database. It works too.
    So the only things i leave is the Oracle ODBC driver.
    Anythings I should do for the Oracle ODBC server?
    Thanks very much.

    Hi, I checked the registry of Oracle and
    in the NLS_LANG field, the values is AMERICAN_AMERICA.UTF8. In the server side, I set the same.
    It should be okay, as i can retrieve the chinese content in the Oracle. Just that when i try to run a query contain chinese, such as,
    "insert into TableA values ('���')". i will got some strange character inserted in the databasae.
    Could you tell me what should i do?
    Thanks a lot a lot.

  • SAP Query with Logical databse BRM

    Hi All,
    I'm developing one report by SAP Query using with logical database BRM to pick the accounting documents. But I would like add some kind of where condtion for one of field for BKPF table. Is there way to achieve this by using logical database concept? If there is a way please help me.
    Thanks in advance.
    Regards,
    TNR

    hi
    in SQVI, kindly follow the below steps:
    a.  in the left hand pane, click on the data fields.
    b.  expand the 'accounting document header'.
    c.  for the field BKPF-TCODE click on the 'List Fields' and the 'Selection fields'.
    d.  click on execute,
    e. you can now enter the values for the BKPF-TCODE.
    regards
    eashwar
    Edited by: eashwar1 on Feb 11, 2010 11:55 AM

  • SAP Query with Logical databse

    Hi All,
    I'm developing one report by SAP Query using with logical database BRM to pick the accounting documents. But I would like add some kind of where condtion for one of field for BKPF table. Is there way to achieve this by using logical database concept? If there is a way please help me.
    Thanks in advance.
    Regards,
    TNR

    hi
    in SQVI, kindly follow the below steps:
    a.  in the left hand pane, click on the data fields.
    b.  expand the 'accounting document header'.
    c.  for the field BKPF-TCODE click on the 'List Fields' and the 'Selection fields'.
    d.  click on execute,
    e. you can now enter the values for the BKPF-TCODE.
    regards
    eashwar
    Edited by: eashwar1 on Feb 11, 2010 11:55 AM

  • Update query with multiple foreign key parameters

    I am trying to perform an update query on one field that uses multiple foreign key parameters from one table to update the other table. The data in all three foreign key parameter fields are not constant. Accuracy is absolutely critical. I tied this as well as other various scenarios with no success. Can anyone help?
    Update A_table a
    set a.rate = (
    select b.rate
    from B_table b
    where b.id = a.id
    and b.transdate = a.transdate
    and b.orgnum = a.orgnum
    and b.transdate = to_date('31/12/2007', 'dd/mm/yyyy')
    )

    I would check symbols by a user name and number of posts before calling anyone a hot shot, especially damorgon.<br><br>
    Yes version matters (due to bugs and features in each version).<br>
    DDL matters because of indexes and associations.<br>
    Data matters because it makes a difference on how SQL can be written.<br>
    Reasons why an SQL statement don't work is because we aren't looking over your shoulder at your screen.<br><br>
    damorgon did leave off his list that the best place for this question is on the PL/SQL, where they will ask you similar questions in addition to your explain plan and data volumes.

  • Problem: Jstl update query with Jquery script

    Hi all,
    i'm writing a jsp page with this 3 star rating Jquery script to show and vote some <div> (results) .
            <script type="text/javascript">
                                        jQuery(document).ready(function($) {
                                            $("#${Rss.pages_id}").stars({
                                                cancelShow: false,
                                                captionEl: $("#<%=i%>"),
                                                callback: function(ui, type, value){
                                                    alert("Callback! ID = ${Rss.pages_id} Clicked: " + type + ", value: " + value );
                                            $("#${Rss.pages_id}").stars("select", ${Rss.trust_value})
                                    </script>Now i want update the value in my DB(MySql) everytime that i will click on my "star rating"..i want do this with an jstl update query.
    Someone can help me?? Thanks

    Just so as you remember that jquery/javascript is completely client side.
    JSP/JSTL is completely server side.
    The only way to invoke java/JSP from javascript code is to make an http request - normally via ajax.
    Given that, it doesn't make sense to put jquery code and a JSTL update query within the same JSP page.
    The code to update the database should be a seperate resource called by ajax from the main page.
    In that case, it doesn't have to be (and probably shouldn't be) done with JSTL. It is better done with java code within servlet/beans.
    cheers,
    evnafets

  • Error in update query with join

    hi all,
    im using oracle 10g in windows.
    im not able to use this update query having join......
    UPDATE
    b
    SET
    b.is_stud = 1
    FROM
    boy b
    INNER JOIN
    relationship r
    ON
    b.id = r.boy_id;
    thanks a lot..................

    887268 wrote:
    hi, thanks,,,,,,,,,
    create table emp ( id,name,date,empno);
    create table emp_status(slno,ename,empno);
    i need to update "emp.name" in "emp" table from "emp_status.ename"
    where emp.empno=emp_status.empno;
    i.e) for all matched "empno" from both table, update "emp.name" from "emp_status.ename"Whats the relationship between emp and emp_status tables? If there exists one to one mapping for empno in both tables, then try
    update emp e
    set    e.name = (select es.ename
                     from   emp_status es
                     where  e.empno = es.empno)

  • Can not execute a simple update query with ms access

    Hi
    I am trying to execute a simple update query , this is the code I am running : I get no exeptions but the db is not being updated .
    When I copy my query into access it works !
    The table / columns are spelled correctly and I am able to execute select queries.
    can anyone figure out what is going on
    Thanks shahar
    public static void main(String[] args) {
    MainManager mainManager = MainManager.getInstance();
    Log log = Log.getInstance();
    try {
    log.writeDebugMessage("befor executing query");
    //stmt.executeUpdate("update trainee set Trainee_Name = 'shahar&Rafi' where Trainee_Id = 1 ");
    //stmt = null ;
    PreparedStatement stmt1 = con.prepareStatement("UPDATE Trainee SET Trainee_Name =? WHERE Trainee_Id =?");
    String name = new String("Shahar&Rafi");
    int Id = 1 ;
    stmt1.setString(1,name);
    stmt1.setInt(2,Id);
    System.out.println(stmt1.toString());
    stmt1.execute();
    log.writeDebugMessage("After executing query");
    catch (SQLException e ){
    System.err.println("SQLException: " + e.getMessage());
    }

    Hi All,
    got the problem solved at last.
    first, in the SQL string all the values must be within " ' "
    for example:
    INSERT INTO Trainee(Trainee_Id , Trainee_password , Trainee_Address, Trainee_Name , Trainee_Phone , Trainee_Gender , Trainee_SessionTime , Trainee_Purpose , Trainee_HealthStatus , Trainee_StartDate , Trainee_Birthday) VALUES (6,'333','hhhh','rafi',048231821,true,63,4,true, ('Feb 22, 2002'), ('Feb 22, 2002'))
    second and more important,
    a 'dummy' sql select query must be performed after an update query
    example for code:
    try{
    DB.MainManager.getInstance().ExecuteUpdateQuery(A);
    DB.MainManager.getInstance().getStatement().executeQuery("SELECT * FROM Trainee");
    where A is the update query.

  • For Update Query with Wait Clause from ORACLE Forms

    Hi
    We are using Oracle Forms 10g running with 10g database 10.2.0.1.0. We happend to see a query which is getting generated in AWR report like Select rowid, all_columns from TableName for Update of C1 Nowait. But no such query is really written in forms and we are aware that, Any query prefixed with rowid is definitely executing from Forms. But how the ForUpdate and Nowait clause is appended to the query.
    We have checked the following properties in the database Block
    *1) Locking Mode is set to Automatic*
    *2) Update Changed Columns only is set to YES*
    *3) Query all records is set to No (Though this particular property may not be relevant to the issue)*
    What is the property or setting which might trigger such a query from ORACLE Forms with ForUpdate and Nowait clause.
    Any ideas/suggestions on why such behaviour. Please have a healthy discussion on this. Thanks in advance.

    Why have you started another thread on the same thing?
    FOR UPDATE cursor is causing Blocking/ Dead Locking issues
    Just use one thread to avoid confusion.
    The fact that nobody has answered on the other thread for a couple of days could be to do with it being the weekend and most people are not at work.
    Either be patient or, if it's more "urgent" than that, raise a SR/Tar with Oracle metalink.

  • Update query with case

    my table : workingdate
    sno name startdate
    1 ss 1-12-2011
    2 bb 1-11-2011
    I can update name or start date or both .i will pass new date,name to update through front end.
    I need to validate the condition in case statement i.e. when the new date passed check whether it is greater then start date. if it is greater then it should update with new start date.
    if no then it should be update it will old value.
    i using below query
    update workingdate set name='sss',startdate=(
    case
    when
    (TO_DATE('2011-12-10','yyyy-MM-dd') > (select TO_DATE(startdate,'yyyy-MM-dd') from workingdate where sno=1))
    then TO_DATE('2011-12-10','yyyy-MM-dd')
    else
    select TO_DATE(start_date,'yyyy-MM-dd') from workingdate where sno=1
    end
    where sno=1;
    but when i execute the above query it shows me
    Error report:
    SQL Error: ORA-00936: missing expression
    00936. 00000 - "missing expression"
    *Cause:   
    *Action:
    how could i resolve this.......................

    Check this out
    UPDATE workingdate
    SET NAME='sss',
         startdate=(CASE WHEN (TO_DATE('2011-12-10','yyyy-MM-dd') > startdate THEN TO_DATE('2011-12-10','yyyy-MM-dd') ELSE start_date END)
    WHERE sno=1;Cheers
    Kanchana

  • Update query with non-equijoin

    I have three tables - sales_order, item and price.
    I want to update item.actual_price with price.list_price.
    The item table is joined to the sales_order table using order_id. The appropriate list_price for each order_id is where sales_order.order_date is between price.start_date and price.end_date for the appropriate product_id. The item table is joined to the price table using product_id.
    Here is the update I have come up with, but it's giving me the wrong results.
    update item i1 set i1.actual_price =
    (select p.list_price from price p, item i2, sales_order s
    where i1.order_id=i2.order_id
    and i1.item_id=i2.item_id
    and i2.product_id = p.product_id
    and i2.order_id=s.order_id
    and s.order_date between p.start_date and nvl(p.end_date,sysdate))
    Any suggestions most welcome!

    Thanks for the hint, maybe I have implemented it incorrectly, but I have done the following query and some of the actual_price figures (based on manually checking them) are incorrect. Does anything look wrong with the following:
    update pcombo pi set pi.actual_price=
    (select pr.list_price from price pr where pr.product_id=pi.product_id and pi.order_date between pr.start_date and nvl(pr.end_date,sysdate))
    where exists
    (select pr.list_price from price pr where pr.product_id=pi.product_id and pi.order_date between pr.start_date and nvl(pr.end_date,sysdate))

  • Trying to convert SELECT query to Update query with INNER JOINS

    Assalam O Alaikum!
    I've tried to convert this query of mine but failed.
    I wish to use it for update datasource in data GridView. I'm fetching data with it but converting it to update is not helping giving multiple errors.
    I tried to share the pic but they don't let me do so. Its actually a gridView with check boxes. check the item and update it..
    Here is the query. Please help me with that.
    <pre>
    SELECT [rightsId], [saveRights], [updateRights],
    [viewRights], [deleteRights], [printRights],
    [processRights], [verifyRights], [unProcessRights],
    [unVerifyRights], CONVERT(VARCHAR(100),tblGroup.groupId)as groupId, convert(varchar(100),tblmenu.[menuId])as menuid
    FROM [tblRights] inner join tblMenu ON
    tblMenu.menuId=tblRights.menuId INNER JOIN
    tblGroup ON tblGroup.groupId=tblRights.rightsId
    </pre>

    code is fine the above query works fine with the fetching(select) but when I try to write it with update it doesn't. Here is the asp code. I'm doing nothing with c# or vb.
      <asp:GridView ID="GridView1" runat="server" AllowPaging="True"
                DataSourceID="ratGrid" AutoGenerateColumns="False"
                CssClass="GridViewStyle" Width="100%" AllowSorting="True" AutoGenerateEditButton="True" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2">
                <Columns>
                    <asp:BoundField DataField="rightsId" HeaderText="rightsId" ItemStyle-Width="75px" SortExpression="rightsId" Visible="False">
                    <ItemStyle Width="75px" />
                    </asp:BoundField>
                    <asp:CheckBoxField DataField="saveRights" HeaderText="Save" SortExpression="saveRights" />
                    <asp:CheckBoxField DataField="updateRights" HeaderText="Update" SortExpression="updateRights" />
                    <asp:CheckBoxField DataField="viewRights" HeaderText="View" SortExpression="viewRights" />
                    <asp:CheckBoxField DataField="deleteRights" HeaderText="Delete" SortExpression="deleteRights" />
                    <asp:CheckBoxField DataField="printRights" HeaderText="Print" SortExpression="printRights" />
                    <asp:CheckBoxField DataField="processRights" HeaderText="Process" SortExpression="processRights" />
                    <asp:CheckBoxField DataField="verifyRights" HeaderText="Verify" SortExpression="verifyRights" />
                    <asp:CheckBoxField DataField="unProcessRights" HeaderText="UnProcess" SortExpression="unProcessRights" />
                    <asp:CheckBoxField DataField="unVerifyRights" HeaderText="UnVerify" SortExpression="unVerifyRights" />
                    <asp:BoundField DataField="groupId" HeaderText="groupId" ReadOnly="True" SortExpression="groupId" Visible="False" />
                    <asp:BoundField DataField="menuid" HeaderText="menuid" SortExpression="menuid" ReadOnly="True" Visible="False" />
                </Columns>
                <RowStyle CssClass="RowStyle" BackColor="#FFF7E7" ForeColor="#8C4510" />
                <PagerStyle CssClass="PagerStyle" ForeColor="#8C4510" HorizontalAlign="Center" />
                <SelectedRowStyle CssClass="SelectedRowStyle" BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                <HeaderStyle CssClass="HeaderStyle" BackColor="#A55129" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle CssClass="AltRowStyle" />
                <SortedAscendingCellStyle BackColor="#FFF1D4" />
                <SortedAscendingHeaderStyle BackColor="#B95C30" />
                <SortedDescendingCellStyle BackColor="#F1E5CE" />
                <SortedDescendingHeaderStyle BackColor="#93451F" />
            </asp:GridView>
            <asp:SqlDataSource ID="ratGrid"
                 runat="server"
                ConnectionString="<%$ ConnectionStrings:Conn_Str %>"
                SelectCommand="SELECT [rightsId], [saveRights], [updateRights],
    [viewRights], [deleteRights], [printRights],
    [processRights], [verifyRights], [unProcessRights],
    [unVerifyRights], CONVERT(VARCHAR(100),tblGroup.groupId)as groupId, convert(varchar(100),tblmenu.[menuId])as menuid
    FROM [tblRights] inner join tblMenu ON
    tblMenu.menuId=tblRights.menuId INNER JOIN
    tblGroup ON tblGroup.groupId=tblRights.rightsId"
               FilterExpression="menuId like '{0}%' and [groupId] like '{1}%'" >
                            <FilterParameters>
                <asp:ControlParameter ControlID="ddlmenu" Name="menu"
                        PropertyName="SelectedValue" Type="String" />
                <asp:ControlParameter ControlID="ddlgroup" Name="Country"
                        PropertyName="SelectedValue" Type="String" />
                </FilterParameters>
            </asp:SqlDataSource>
    Your table needs key(s) and you need to assign the key as DataKeys property for the GridView to make your UpDate and Delete work without coding.

  • New fields for query with logical DB AFI

    Hello,
    I'm trying to change a Query (SQ01) that uses an infoset that gets the data from a logica DB (AFI), and I would like to include some fields that are not in that logical DB (VIQMFE-OTGRP, VIQMFE-OTEIL, VIQMFE-FEGRP, VIQMFE-FECOD).
    Any idea or manual to do this?
    Thanks a lot!

    Hi!
    I found the solution to this problem.
    In order to show some fields that are not of de BDL, in the Extra tab of infoSet, I insert additional information on node DIAUFK.
    In concrete for the fields that I need, I make a selection in QMFE table and insert the columns that I want.

Maybe you are looking for

  • Mapping multi-segment IDOC to multiple JDBC INSERT statements

    Hi Everyone, This is probably going to be easy for the experienced PI developers out there but I'm just starting out in this technology. We are running PI 1.11 and the scenario is as follows. We have a bespoke IDOC message type ZSTOCK which can conta

  • My ratings have "disappeared"

    I made a second library for about 5000 photos (CR2) that I took on a trip, which lives on a networked hard drive.  I applied ratings and keywords to about half of the images; but since upgrading to Lion and Aperture 3.2, I cannot see any of the ratin

  • FontBook issues since upgrading to Mavericks

    Since upgrading to mavericks when i try to install new typefaces (.otf, work perfectly on my other computers which are running on mountain lion). They do not show up in font book. Even when I manually add them to the Fonts folder, they still do not s

  • Lost iTunes Authorizations after Yosemite Upgrade

    I was running the latest version of iTunes on Mavericks and it was authorized. I had used all 5 authorizations before starting the upgrade. After upgrading to Yosemite (I did not do an erase and install. I did the standard upgrade) I opened iTunes an

  • In PS-CC, Brush diameter jumps from 508px to 1048px...

    In PS-CC, the Brush diameter scale jumps from 508px to 1048px as I am dragging the slider. I have to type in a size I need above 508px whereas my older PS versions had a smooth scaler. Can I get back to the older PS brush slider? Is there a setting I