Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6558117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:09:36+00:00 2026-05-25T13:09:36+00:00

I can do this in MS-Access (and it works) but need the equivalent in

  • 0

I can do this in MS-Access (and it works) but need the equivalent in SQL Server 2000. All fields reside in the same table (tbl_Toll_Free_Final). Percent_Busy is a Decimal (18,5) and the others are Integers.

I have tried this and Percent_Busy is updated to 0. Total_Busy_Calls or Overflow_Calls can be 0 so perhaps its a div by zero error but SQL server does not report any error.

UPDATE dbo.tbl_Toll_Free_Final
SET Percent_Busy =
  (Total_Busy_Calls + Overflow_Calls) / (Total_Calls + Overflow_Calls)

For example:

  • Total_Busy_Calls = 12, Overflow_Calls = 0 so first result is 12
  • Total_Calls = 1000, Overflow_Calls = 12 so second result is 1012
  • Calculation is 12/1012=0.0119

Hope you SQL Server gurus can help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:09:37+00:00Added an answer on May 25, 2026 at 1:09 pm

    Try this:

    UPDATE dbo.tbl_Toll_Free_Final 
    SET Percent_Busy = 
      (Total_Busy_Calls + Overflow_Calls) / 
      CAST((Total_Calls + Overflow_Calls) AS DECIMAL(18,5))
    

    You are dividing an integer by an integer which ignores decimals, remainders, fractions, etc. By casting the divisor to a decimal, you avoid this integer division.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't solve this on MS Access SQL. I have a foo table with
I'm hosting my project in a test server (proyectos.legendsoft.com.ve), but since i need this
Protected Means, we can access this member only in a deriving class, and internal
I have a Page with many Comments. Many users can access this page and
How can this code compile? The code below in the operator int CAN access
I have an URL like this /home/action/id How can I access this id in
How does this program access other processes memory? How can it write into the
according to this code if i want to access imageView1 and imageView2 how can
What is the maximum file size 32 bit java can access? Is this architecture
As I just learned from this question , .NET regexes can access individual matches

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.