Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    77

    Unanswered: Question about Max function

    I have table name datagraph
    dat price
    08/30/2004 23
    09/1/2004 100
    09/1/2004 21
    09/1/2004 12
    09/1/2004 32

    I want to write Sql that show the highest price of today. I tried

    sql="select max(price)from datagraph where dat like '%"&date()&"%')"

    It does not work !!

  2. #2
    Join Date
    Oct 2002
    Location
    Plymouth UK
    Posts
    116
    Which database server?

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    To echo gannet, which database engine? It would also help if you could post the DDL for the table, since it looks like your dat column might be text of some kind instead of a date column.

    -PatP

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    it's access, and it's a text column

    see http://www.dbforums.com/t1009057.html

    gop373, use a DATE/TIME column
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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