3 Replies Latest reply on Mar 5, 2007 8:09 PM by Dan Bracuk

    where max

    craig_mac Level 1
      gday just have a small problem.

      i need to have a select statement like below, but this gives me an error, any ideas how to do this

      so what i need is to select all where the number matches and then select the last record of this number

      <CFQUERY datasource="#application.ds#" Name="Show">
      SELECT *
      FROM sms_records
      WHERE NumberSent = '421365488' AND ID = Max(ID)
      </cfquery>