Results 1 to 7 of 7

Thread: Unknown error

  1. #1
    Join Date
    Aug 2012
    Posts
    9

    Question Unanswered: Unknown error

    I am trying to get the minimum and maximum values from a field in SQL Server 2008 Express, but I cannot even get started because I keep getting this error that I cannot figure out. Any advice would be truly appreciated, and thanks in advance!!
    Attached Thumbnails Attached Thumbnails min_maxavgerror.JPG  

  2. #2
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    You have an extra comma after last field selected, to start with, so remove it first and run query again.

  3. #3
    Join Date
    Aug 2012
    Posts
    9
    Not sure exactly what field you are referring to....
    Please clarify!!

  4. #4
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    Take the line
    Code:
    AS value(v)) as [MaxDate],
    and replace it with
    Code:
    AS value(v)) as [MaxDate]
    This is the extra comma that corncrowe mentioned.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

  5. #5
    Join Date
    Aug 2012
    Posts
    30
    To me the current query doesnt make much sense. can you explain what you're trying to achieve with this?

  6. #6
    Join Date
    Aug 2012
    Posts
    9
    I was trying to get the maximum salary, but I have realized since that I could just have written Select MAX(Salary) to get what I needed, but thanks for the interest!!

  7. #7
    Join Date
    Aug 2012
    Posts
    30
    ok...glad that you sorted it out!

Tags for this Thread

Posting Permissions

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