December 7, 2018 at 11:53 am
I am trying to divide in SQL:
Total_Duty / ([Chap 99 Rate] + DutyRate) as Entererd_Value
I think is have to cast as numeric, but nothing i've tries is working.
Thoughts?
As always, much appreciated.
December 7, 2018 at 12:06 pm
I finally found that using NULLIF in the denominator works for me,
thanks
December 7, 2018 at 12:27 pm
jeffshelix - Friday, December 7, 2018 11:53 AMI am trying to divide in SQL:
Total_Duty / ([Chap 99 Rate] + DutyRate) as Entererd_Value
I think is have to cast as numeric, but nothing i've tries is working.Thoughts?
As always, much appreciated.
The question is: what do you want to happen in the case where the divisor is zero?
For example:
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply