Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Not work correctly

Not work correctly

Scheduled Pinned Locked Moved Database
helpannouncement
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 9968184
    wrote on last edited by
    #1

    Hi I try to update a value inside a table (ExTable01) but updated value is not true.Please help. When I apply update Saved wrong value is 891257536,00 (Column type real False ) but True value is 891257560 ( --> 97352 * 9155 = 891257560 ) Best regards

    L 1 Reply Last reply
    0
    • U User 9968184

      Hi I try to update a value inside a table (ExTable01) but updated value is not true.Please help. When I apply update Saved wrong value is 891257536,00 (Column type real False ) but True value is 891257560 ( --> 97352 * 9155 = 891257560 ) Best regards

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Which database system? And how are you updating? If through an update statement, where is it?

      U 1 Reply Last reply
      0
      • L Lost User

        Which database system? And how are you updating? If through an update statement, where is it?

        U Offline
        U Offline
        User 9968184
        wrote on last edited by
        #3

        MSSQL-TSQL From Calucaltor TRUE RESULT : 164016 * 9155 = 1501566480 I check form profiler: Update TestTable Set Con=@Con, Ust=@Ust, En =@En,Tem=@Tem, Where ID=@ID',N'@Con decimal(6,0),@Ust decimal(4,0),@En decimal(10,0),@Tem decimal(3,2), ID bigint',@Con=164016,@Ust=9155,@En=1501566480,@Tem=7.50,@ID=95452 Finally I check database to see value: select str(En,25,5) as ToSeevalue, En, Con , Ust,* from TestTable where ID = 95452 -- REsult (WRONG OUTCOME): ToSeevalue: 1501566464.00000 En: 1,501566E+09 Con: 164016 Ust: 9155

        L S U 4 Replies Last reply
        0
        • U User 9968184

          MSSQL-TSQL From Calucaltor TRUE RESULT : 164016 * 9155 = 1501566480 I check form profiler: Update TestTable Set Con=@Con, Ust=@Ust, En =@En,Tem=@Tem, Where ID=@ID',N'@Con decimal(6,0),@Ust decimal(4,0),@En decimal(10,0),@Tem decimal(3,2), ID bigint',@Con=164016,@Ust=9155,@En=1501566480,@Tem=7.50,@ID=95452 Finally I check database to see value: select str(En,25,5) as ToSeevalue, En, Con , Ust,* from TestTable where ID = 95452 -- REsult (WRONG OUTCOME): ToSeevalue: 1501566464.00000 En: 1,501566E+09 Con: 164016 Ust: 9155

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          I don't understand how ToSeevalue is updated, is it a calculated field?

          1 Reply Last reply
          0
          • U User 9968184

            MSSQL-TSQL From Calucaltor TRUE RESULT : 164016 * 9155 = 1501566480 I check form profiler: Update TestTable Set Con=@Con, Ust=@Ust, En =@En,Tem=@Tem, Where ID=@ID',N'@Con decimal(6,0),@Ust decimal(4,0),@En decimal(10,0),@Tem decimal(3,2), ID bigint',@Con=164016,@Ust=9155,@En=1501566480,@Tem=7.50,@ID=95452 Finally I check database to see value: select str(En,25,5) as ToSeevalue, En, Con , Ust,* from TestTable where ID = 95452 -- REsult (WRONG OUTCOME): ToSeevalue: 1501566464.00000 En: 1,501566E+09 Con: 164016 Ust: 9155

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            What do you mean by "wrong outcome"? Please explain exactly what, in the above, is considered wrong.

            Veni, vidi, abiit domum

            1 Reply Last reply
            0
            • U User 9968184

              MSSQL-TSQL From Calucaltor TRUE RESULT : 164016 * 9155 = 1501566480 I check form profiler: Update TestTable Set Con=@Con, Ust=@Ust, En =@En,Tem=@Tem, Where ID=@ID',N'@Con decimal(6,0),@Ust decimal(4,0),@En decimal(10,0),@Tem decimal(3,2), ID bigint',@Con=164016,@Ust=9155,@En=1501566480,@Tem=7.50,@ID=95452 Finally I check database to see value: select str(En,25,5) as ToSeevalue, En, Con , Ust,* from TestTable where ID = 95452 -- REsult (WRONG OUTCOME): ToSeevalue: 1501566464.00000 En: 1,501566E+09 Con: 164016 Ust: 9155

              S Offline
              S Offline
              Simon_Whale
              wrote on last edited by
              #6

              Also what types are the following? Con Ust En

              Every day, thousands of innocent plants are killed by vegetarians. Help end the violence EAT BACON

              1 Reply Last reply
              0
              • U User 9968184

                MSSQL-TSQL From Calucaltor TRUE RESULT : 164016 * 9155 = 1501566480 I check form profiler: Update TestTable Set Con=@Con, Ust=@Ust, En =@En,Tem=@Tem, Where ID=@ID',N'@Con decimal(6,0),@Ust decimal(4,0),@En decimal(10,0),@Tem decimal(3,2), ID bigint',@Con=164016,@Ust=9155,@En=1501566480,@Tem=7.50,@ID=95452 Finally I check database to see value: select str(En,25,5) as ToSeevalue, En, Con , Ust,* from TestTable where ID = 95452 -- REsult (WRONG OUTCOME): ToSeevalue: 1501566464.00000 En: 1,501566E+09 Con: 164016 Ust: 9155

                U Offline
                U Offline
                User 9968184
                wrote on last edited by
                #7

                I found a solution .Column data type was real I changed it.Now it's decimal (38,4)

                L 1 Reply Last reply
                0
                • U User 9968184

                  I found a solution .Column data type was real I changed it.Now it's decimal (38,4)

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Update the original question and the title to indicate that your issue has been fixed. Also, please describe your fix.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups