Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Date Range Output

forums forums SQLyog Using SQLyog Date Range Output

  • This topic is empty.
Viewing 4 reply threads
  • Author
    Posts
    • #10116
      gaspower
      Member

      Hello,

      I understand select, from and to execute. But say I only wanted a certain date range. I believe you use the where command?

      Thanks JR

    • #23194
      peterlaursen
      Participant

      yes – you use the WHERE clause(“SELECT .. FROM … WHERE …”)

      examples:

      … WHERE `thename` like 'gas%' …

      … WHERE `thedate` = '2006-01-05' …

      … WHERE `thetime` >= '2006-01-05 12:00:00' …

      … WHERE `theuser` IS NOT NULL …

      … WHERE `theuser` IS NOT NULL and `thename` like 'gas%' and `thetime` >= '2006-01-05 12:00:00' …

      Also use the LIMIT clause to retun only a limited number of rows.

    • #23195
      gaspower
      Member

      Hello,

      Thank you for the reply. I am sorry, very new to this, so if I wanted a date range, would it be WHERE `thedate` = '2006-01-05' – '2006-01-10' ?

      Thanks JR

    • #23196
      peterlaursen
      Participant

      like

      Code:
      WHERE `thedate` >= '2006-01-05' and `thedate` < '2006-01-10'

      ??

    • #23197
      gaspower
      Member

      Thank you very much

      JR

Viewing 4 reply threads
  • You must be logged in to reply to this topic.