#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 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
  3. Contributing User
    ASP Adventurer (500 - 999 posts)

    Join Date
    Jun 2011
    Location
    South Jersey
    Posts
    544
    Rep Power
    59
    Originally Posted by rclark1
    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.

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

IMN logo majestic logo threadwatch logo seochat tools logo