Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sanlen
Starting Member
29 Posts |
Posted - 2008-11-20 : 23:53:58
|
| Hi All,I have table as belowID Project_Name Finish_Date1 ABC 1/1/20092 DDDD 3/3/20083 CCC 20/11/2008 4 AAA 12/12/20085 XYZ 15/11/2008I want to extract on the project which need to be finished in the current month.Could you please advise?Best Regard,SANLEN |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-21 : 00:24:39
|
| [code]SELECT ID ,Project_Name ,Finish_Date FROM YourTable WHERE Finish_Date>= DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0)AND Finish_Date< DATEADD(mm,DATEDIFF(mm,0,GETDATE())+1,0)[/code] |
 |
|
|
|
|
|