How do I modify this query ?

sql server India
  • 12 years 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.


  • 12 years ago


    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')





  • 12 years ago


     One more method.

     SELECT engdate FROM ConDate

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


    Hari K....

Post a reply

Enter your message below

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


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer lets you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila” - Mitch Ratcliffe