–Not working—-

select 69.002 * ( 57.2958 *

(ACOS(

COS( 0.0174533 * 38.27 )*

COS( 0.0174533 * (3827/100.0 ))*

COS(0.0174533 * ((-104.63) – (-10463/100.0))) +

SIN(0.0174533 * 38.27 ) * SIN(0.0174533 * (3827/100.0)))

)

) OrgDistance

–Working—-

select 69.002 * ( 57.2958 *

(ACOS(

convert(decimal(18,4),

COS( 0.0174533 * 38.27 )*

COS( 0.0174533 * (3827/100.0 ))*

COS(0.0174533 * ((-104.63) – (-10463/100.0))) +

SIN(0.0174533 * 38.27 ) * SIN(0.0174533 * (3827/100.0)))

)

)

) OrgDistance

Regards,

Subir

]]>I have some floating field problem

i have 2 field , field A as float, field B as float

in a record field A has 0.15 value and field B has 0.15 value also (Using Select statement)

but when i use “Select fieldA – fieldB From tableName Where KeyField = Key” the result is 2.77555756156289E-17

i encountered the problem when i have unexpected result from my stored procedure that determine deviation of the two fields. i still dunno why this happening (i’m using sql server 2008)

]]>