Thread: What is wrong with this equation?

Results 1 to 2 of 2
Share This Thread →
  1. #1
    rclark1 is offline Registered User ASP Free Newbie (0 - 499 posts)
    Join Date
    Apr 2012
    Posts
    1
    Rep Power
    0

    Exclamation What is wrong with this equation?

    Hi all,

    I am trying to use a query to calculate the value of field in table. This is the equation that i came up with

    FIELD:| <FieldToBeCalualted>: Sqr(([Field1]-[Field2])^2+([Field3]-[Field3])^2)
    TABLE:| <Table

    but when i try to run the query it throws back "Extra ) in query expression"

    What am i missing?

    here is the equation in excel that i am trying to copy

    =SQRT((C8-A8)^2+(D8-B8)^2)

    Thanks

  2. #2
    meratigoerr's Avatar
    meratigoerr is offline Contributing User ASP Free Novice (500 - 999 posts)
    Join Date
    Jun 2011
    Location
    South Jersey
    Posts
    521
    Rep Power
    57
    Quote Originally Posted by rclark1 View Post
    Hi all,

    I am trying to use a query to calculate the value of field in table. This is the equation that i came up with

    FIELD:| <FieldToBeCalualted>: Sqr(([Field1]-[Field2])^2+([Field3]-[Field3])^2)
    TABLE:| <Table

    but when i try to run the query it throws back "Extra ) in query expression"

    What am i missing?

    here is the equation in excel that i am trying to copy

    =SQRT((C8-A8)^2+(D8-B8)^2)

    Thanks
    I don't see anything missing copied into a test DB your equation works fine, but Field3 - Field3 squared will always be zero. Can you copy and paste the whole SQL statement you are using?
    Last edited by meratigoerr; January 8th, 2013 at 05:47 AM.

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. The Macalope Weekly: Wrong, wrong, wrong! (Macworld.com)
    By RSS_News_User in forum Technology News
    Replies: 0
    Last Post: June 12th, 2010, 12:00 PM
  2. Math Equation
    By erickh in forum ASP Development
    Replies: 18
    Last Post: April 11th, 2006, 01:54 AM
  3. Math Equation
    By erickh in forum ASP Development
    Replies: 1
    Last Post: April 6th, 2006, 05:47 AM
  4. help math equation
    By renee in forum .NET Development
    Replies: 2
    Last Post: April 22nd, 2005, 12:57 PM
  5. Simple equation
    By Amara in forum ASP Development
    Replies: 2
    Last Post: November 23rd, 2004, 03:22 PM

ASP Free Advertisers and Affiliates