This rings a bell! This has happened to me a few times when I modified
the definition of a computed column or one of the columns it depended on.
It was like I needed to "force" a recalculate of all the rows.
So do a meaningless update of the entire table:
update table set columnname = columnname
This just sets a column to itself. The only problem with this is if you
have a computed column set to .#DATE or something like that, because
it would reset all those dates.
Karen
-----Original Message-----
From: Hodges, Dennis <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Wed, May 28, 2014 11:06 am
Subject: [RBASE-L] - RE: Adding Columns with zeros
All fields are double. Here is the result.
R>connect wdoss
Database Exists
R>show zero
(ZERO ) ON Treat nulls as ZERO in numeric calculations
R>browse realhrs, safhrs, callhrs, (realhrs + 0) as tothrs from t3t
R>Select realhrs, safhrs, callhrs, (realhrs + safhrs + callhrs) as tothrs from
t3append
realhrs safhrs callhrs tothrs
--------------- --------------- --------------- ---------------
8. 0. 0. 0.
10. 0. 0. 0.
7. 0. 0. 0.
7.25 0. 0. 0.
10. 0. 0. 0.
6.5 0. 0. 0.
8. 0. 0. 0.
1. 0. 0. 0.
2. 0. 0. 0.
2.5 0. 0. 0.
3. 0. 0. 0.
5. 0. 0. 0.
6. 0. 0. 0.
7. 0. 0. 0.
8. 0. 0. 0.
9. 0. 0. 0.
9.5 0. 0. 0.
0.5 0. 0. 0.
Dennis Hodges
Maintenance Management Manager
FDOT Office of Maintenance MS #52
PH: (850) 410-5635
FAX: (850) 410-5511
[email protected]
Please note: e-mail may be subject to public disclosure.
From: [email protected] [mailto:[email protected]] On Behalf Of Javier Valencia
Sent: Wednesday, May 28, 2014 12:00 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Adding Columns with zeros
What type are the columns? To add they must not be TEXT.
Try the following and see if it works:
Select realhrs, safhrs, callhrs, (realhrs + safhrs + callhrs) as tothrs from
t3append
Now you should see the individual values and the sum.
Javier,
Javier Valencia, PE
O: 913-829-0888
H: 913-397-9605
C: 913-915-3137
From:[email protected] [mailto:[email protected]]On Behalf Of Hodges, Dennis
Sent: Wednesday, May 28, 2014 10:16 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Adding Columns with zeros
I see the column, it just has zeros in each row.
Dennis Hodges
Maintenance Management Manager
FDOT Office of Maintenance MS #52
PH: (850) 410-5635
FAX: (850) 410-5511
[email protected]
Please note: e-mail may be subject to public disclosure.
From: [email protected] [mailto:[email protected]]On Behalf Of Javier Valencia
Sent: Wednesday, May 28, 2014 11:12 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Adding Columns with zeros
Dennis,
I tried the same thing and it works fine for me . However, when you use the
SELECT command the columns display is limited by the display width and you
might not be seeing all the columns, since the computed column will show up at
the end (right) after all the other columns selected by “*” are dis[played.
Try using BROWSE instead of SELECT and see if all columns display correctly.
BROWSE *, (realhrs + safhrs + callhrs) as tothrs from t3append
Or simply change the order:
Select (realhrs + safhrs + callhrs) as tothrs, * from t3append
And now the computer column should show as the first column.
Javier,
Javier Valencia, PE
O: 913-829-0888
H: 913-397-9605
C: 913-915-3137
From:[email protected] [mailto:[email protected]]On Behalf Of Hodges, Dennis
Sent: Wednesday, May 28, 2014 7:56 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Adding Columns with zeros
I have a view with production data that includes 3 columns for hours and I want
to create a total hours column. I previously converted null values on all
three columns using ifnull(realhrs,0,realhrs). The following gives me zeros
for tothrs:
Select *, (realhrs + safhrs + callhrs) as tothrs from t3append
Any help would be greatly appreciated.
Dennis Hodges
Maintenance Management Manager
FDOT Office of Maintenance MS #52
PH: (850) 410-5635
FAX: (850) 410-5511
[email protected]
Please note: e-mail may be subject to public disclosure.