View previous topic :: View next topic
|
Author |
Message |
H Muraleedhar
New User
Joined: 03 Mar 2009 Posts: 12 Location: Chennai
|
|
|
|
I had a column BTG_AMT , which is declared as S9(9) comp-3. I had inserted the values -2300, -3500 etc . But in table these are stored as 2300 , 3500 . Is it possible to store the negative values like this ? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If negative values are inserted into a table, they remain negative. Either they are not being stored correctly or when retrieved are not being shown properly. . . |
|
Back to top |
|
|
H Muraleedhar
New User
Joined: 03 Mar 2009 Posts: 12 Location: Chennai
|
|
|
|
Thank you Dick. I will check the storing process once more. Because when I used to check the table ( through platinum ) , I see possitive values. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you use SPUFI and insert a few rows with negative values, then run a SELECT query to show them. This will help identify if there is a table definition problem or the problem is in the code. |
|
Back to top |
|
|
H Muraleedhar
New User
Joined: 03 Mar 2009 Posts: 12 Location: Chennai
|
|
|
|
Thank you Dick. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
Is this been resolved? |
|
Back to top |
|
|
H Muraleedhar
New User
Joined: 03 Mar 2009 Posts: 12 Location: Chennai
|
|
|
|
yes this was a problem with sign truncation while moving to host variables. Thank you Dick and others. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Fine - thanks for letting us know the final solution . . . |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome - thank you for letting us know it is working
d |
|
Back to top |
|
|
|