Is there a better way to calculate my result:
All I want is the Result of 30/365 = 0.0821917808 so I can use this in a further calculating. When producing this in a script I get zero. The below is one method to produce the result but there must be a better way.
Any suggestions would be very welcome. Thanks all.
CREATE TABLE [dbo].[_DOS_SCORE] (
[SCORE] [DBO].[EXPCURRENCY] DEFAULT ((0.00)),
[YEAR] [DBO].[EXPCURRENCY] DEFAULT ((0.00)),
[RESULT] [DBO].[EXPCURRENCY] DEFAULT ((0.00)),
[LAST_MODIFIED] DATETIME DEFAULT (GETDATE()) )
INSERT INTO [_DOS_SCORE] (SCORE, YEAR)
VALUES
(30,365),
(60,365)
UPDATE [_DOS_SCORE] SET RESULT = SCORE/YEAR
SELECT * FROM [_DOS_SCORE]