Thanks Ian
I had tried that with the only ttesults being more zeros. What did
work however was this:
SET @WORK = (100.000 - 50.000) / 100
I'm guessing I had to influence the intermediate results datatype to
be float. I'm still not sure if this is caused by a setting or not.
Regardless, thanks for your reply.
Best regards
Paul
[quoted text, click to view] On 15 Aug 2005 02:11:47 -0700, "Ian" <ianh12345@iafrica.com> wrote:
>Hi Paul,
>
>You need to declare your variable as a float if you want the decimals -
>integers will not give you the result your are looking for.
>
>Regards
>Ian
>
>paulv0627@hotmail.com wrote:
>> If I do this in Query Analyzer:
>>
>> DECLARE @WORK INT
>>
>> SET @WORK = (100 - 50) / 100
>>
>>
>> The result is zero. I've checked my SQL Server 2K (SP4) settings and
>> there's nothing obvious. Perhaps a fresh set of eyes can shed some
>> light on this.
>>
>> Thanks
>>
>> Paul