Community discussion forum

How do I modify this query ?

  • 1 year ago

     Hi, I have written a query that returns all the days of 12th month, 2006 year.

    "SELECT * FORM  conDate WHERE engdate LIKE '%[dd]%2006%'"

    How do I modify this query so that it returns all days of ,say 5th month,2006.

    Thanks.

  • 1 year ago

    Hi

    I have solved it myself.

    Here's the query that returns all days of 5th month, 2006

     

    SELECT  engdate

    FROM         conDate
    WHERE     (engdate >= '5/1/2005') AND (engdate < '6/1/2005')

     

    Regards. 

     

     

  • 1 year ago

    Hi

     One more method.

     SELECT engdate FROM ConDate

     WHERE MONTH(endDate)=5 AND YEAR(endDate)=2006

    Regards

    Hari K....

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!