This topic is locked
[SOLVED]

 Rounding an alias field

4/19/2014 1:04:45 PM
ASPRunnerPro General questions
lefty author

Here is my sql for the table
SELECT

ID,

start_quota,

flddate,

fldpts1,

adj1,

winner,

next_quota,

updown1,

fldlast,

fldfirst,

fldemail,

cuppts,

Int(cuppts) + Int(cuppts_start) AS totalpoints,

cuppts_start,

fldpd,

ties,

ties2,

ties3,

fldtime,

givepts,

fldround,

fldpairings,

fldseed

FROM Main

ORDER BY fldtime, ID
The Alias field totalpoints is set to view by number and it just shows
Shows

cuppts / cuppts_start / totalpoints

1.3333 + 0.0000 1.0000
Should be

1.3333 + 0.0000 1.3333
I have also tried custom view

Format number
strValue = CDbl(FormatNumber(strValue,4))

Just shows

1.3333 + 0.0000 1

whole number .
Anyone see something here . This is an alias field so I cannot set field as in table numeric? Or is that what I need to do?

Sergey Kornilov admin 4/19/2014

You converting those numbers to integers, simply add them as is. Instead of

Int(cuppts) + Int(cuppts_start) AS totalpoints,



use

cuppts + cuppts_start AS totalpoints,
lefty author 4/19/2014



You converting those numbers to integers, simply add them as is. Instead of

Int(cuppts) + Int(cuppts_start) AS totalpoints,



use

cuppts + cuppts_start AS totalpoints,



Well, works fine . Thought since they are integers would have to define them . Guess Not . Works fine now.
Thanks