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 9172439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:20:46+00:00 2026-06-17T16:20:46+00:00

I am new to the site and I have a question regarding some code

  • 0

I am new to the site and I have a question regarding some code I have in Access form that I am redoing in SQL Server 2008 and it has SUM, IIF, and IsNumeric all in one line and I am confused as to how to rewrite this in SQL.

Sum([Employee COUNT]*IIf(IsNull([2011]),0,CDbl([2011]))*IIf(IsNumeric([Length]),CDbl([Length]),0)) AS Cost
  • 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-06-17T16:20:48+00:00Added an answer on June 17, 2026 at 4:20 pm

    I believe this will do what you need:

    Sum([Employee COUNT]
        * (case 
                when [2011] Is Null 
                then 0 
                else cast([2011] as float) 
            end)
        * (case 
                when IsNumeric([Length])= 1 
                then cast([Length] as float) 
                else 0 
            end)) AS Cost
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Great site! I have a question I haven't seen answered. I am very new
I have just setup a new local site (localhost/pfb.net/) which has been cloned from
I have the following code snippet: using (SPSite site = new SPSite(this.ListAddress)) { using
I have a quick question regarding to mobile development, I'm new at this, so
I'm new in this site and this is my first question. I have to
i'm new to C language. I have some questions to ask regarding structs. For
I'm fairly new to Python and have a question regarding the following class: class
new to the site. Have a quick questions. It is safe or to load
So I have been experimenting with building a new site... http://zergxost.com/test.html - it will
I am building a new site, and I have a folder on desktop with

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.