Results 1 to 3 of 3

Thread: divide by 0 error

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Location
    bebenia, PA, USA
    Posts
    241
    why is this causing a divide by 0 error???

    update #totals
    set units_cancel_percent = units_sent/units_cancelled

    in my temp table I am trying to divide the results of these two colums by each other in an update statement; how can I do this????

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    Maybe?

    update #totals
    set units_cancel_percent = units_sent/units_cancelled
    where units_cancelled not null and units_cancelled<> 0

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Location
    bebenia, PA, USA
    Posts
    241
    yes, that works

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width