Thanks, Razzak, that proves that it works and should have been an obvious
one for me to try first.
I was hoping that I could avoid posting this but I still cannot get this to
work. Here is a data-shortened version of the file that I am using which
fails to load the data when I include the C_TimeDayLength column definition.
The only difference to the same file that works in v7.6 are the additions of
T_ and C_ in case the names were reserved and thus the problem.
The three C_ -columns are laid out on one line specifically to show in
mono-space that the multiple brackets match and that the names are correct,
etc. Goodness knows what the e-mail system will do to wrap them:
CREATE TEMP TABLE `T_SunRiseSetTimes` +
(`DayNumber` INTEGER NOT NULL ('Value for column DayNumber cannot be null')
, +
`SunRise` REAL NOT NULL ('Value for column SunRise cannot be null')
, +
`SunSet` REAL NOT NULL ('Value for column SunSet cannot be null')
, +
`SunDate` = (ADDDAY( (RDATE(12, 31, ( (IYR(.#DATE)) -1) )),
DayNumber)) DATE , +
`DayLength` = (SunSet - SunRise) DOUBLE , +
`C_TimeSunRise` = +
(RTIME( (INT(SunRise)), (INT( (60 * (MOD(SunRise,
(INT(SunRise)) )) ) )), (INT( (ROUND( (60 * (MOD((60 * (MOD(SunRise,
(INT(SunRise)) )) ), (INT( (60 * (MOD(SunRise,
(INT(SunRise)) )) ) )) )) ), 0)) )) )) TIME , +
`C_TimeSunSet` = +
(RTIME( (INT(SunSet)), (INT( (60 * (MOD(SunSet,
(INT(SunSet)) )) ) )), (INT( (ROUND( (60 * (MOD((60 * (MOD(SunSet,
(INT(SunSet)) )) ), (INT( (60 * (MOD(SunSet,
(INT(SunSet)) )) ) )) )) ), 0)) )) )) TIME , +
`C_TimeDayLength` = +
(RTIME( (INT(DayLength)), (INT( (60 * (MOD(DayLength,
(INT(DayLength)) )) ) )), (INT( (ROUND( (60 * (MOD((60 * (MOD(DayLength,
(INT(DayLength)) )) ), (INT( (60 * (MOD(DayLength,
(INT(DayLength)) )) ) )) )) ), 0)) )) )) TIME , +
`SunComments` TEXT (20) )
LOAD `T_SunRiseSetTimes`
NONUM
1,8.055,16.066,-0-
END
BROWSE * FROM T_SunRiseSetTimes
RETURN
These are the values in v7.6 from that row:
DayNumber, SunRise, SunSet, SunDate, DayLength, TimeSunRise, TimeSunSet,
TimeDayLength, SunComments
1, 8.055, 16.066, 01/01/2010, 8.0109997, 08:03:18, 16:03:58, 08:00:00, -0-
Thanks & regards,
Alastair.
--------------------------------------------------
From: "A. Razzak Memon" <[email protected]>
Sent: Tuesday, May 25, 2010 3:40 AM
To: "RBASE-L Mailing List" <[email protected]>
Subject: [RBASE-L] - Re: Column calculation problem
At 01:03 PM 5/24/2010, Alastair Burr wrote:
I have a table that I UNLOAD/LOAD in v7.6 that refuses to co-operate in
v9.0.
It looks as if the structure in v9.0 will not accept a computed column
based
on a previously computed column???
For example, very simply:
(ColA INT, ColB = (ColA * 10) INT, ColC = (ColB + 1) INT)
My calculations are far more complicated than that but by constructing and
testing adding column by column my equivalent of ColC is where it fails.
Is this expected now or am I just missing something obvious?
Alastair,
Using your scenario above, try the test below, and see what you get:
-- Create_Table_With_Computed_Columns.RMD
-- R:BASE eXtreme 9.0 (32/64)
-- Test for Alastair Burr
-- A. Razzak Memon
-- May 24, 2010
SET ERROR MESSAGE 2038 OFF
DROP TABLE tTest
SET ERROR MESSAGE 2038 ON
CREATE TABLE `tTest` +
(`ColA` INTEGER, +
`ColB`= (ColA*10) INTEGER, +
`ColC`= (ColB+1) INTEGER)
COMMENT ON TABLE `tTest` IS 'Test Table'
RETURN
Hope that provide you with some blue's clues ...
Very Best R:egards,
Razzak.