Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Unanswered: Median Query Access 2003

    Found this on the Internet.

    The first time I ran it, it produced the result. Great!

    Then tried running it again and it keeps saying "syntax error in FROM clause?"

    Would love to get this to work.

    I would also like to GROUP the results by city name.

    Thanks . . . Rick

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Ummm... I think you left something out!

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Mar 2004
    Location
    California
    Posts
    502

    Ups . . .

    I did.

    Code:
    SELECT Avg([Field1]) AS [Median Price]
    FROM [select max(closePrice) as Field1 from (select top 50 percent closePrice from tblhistorical2012 order by closePrice)
    
    UNION
    select min(closePrice) from (select top 50 percent ClosePrice from tblhistorical2012 order by ClosePrice desc)]. AS Median;
    I got it to work, however.

    I need to be able group by a [city] field, a [common walls] field and a mm/yyyy field.


    Any ideas . . .
    Thanks . . . Rick

Posting Permissions

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