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 |
kemi2299
Starting Member
41 Posts |
Posted - 2008-05-23 : 13:06:13
|
hi,guysI am really struggling with this statement, could you pls write in tsql pls.where date_trunc('month',a.month) = (date_trunc('month',edate) - '1 month') |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-05-23 : 13:31:26
|
WHERE DATEPART(mm,a.month) = DATEPART(mm,edate) -1 |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-23 : 13:31:50
|
date_trunc is not a valid SQL Server function. What system are you using?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
|
|