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 |
|
jung1975
Aged Yak Warrior
503 Posts |
Posted - 2003-01-20 : 18:18:28
|
| SELECTDATEADD(d,-1,CONVERT(DATETIME,CONVERT(char(4),YEAR(DATEADD(month,-1,getdate())))+LEFT(CONVERT(varchar,getdate(),10),2)+'01')))got following error messageIncorrect syntax near ')'.I couldn't figure it out what's the problem..any help would be appreciated.. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-01-20 : 18:22:59
|
| You've got one too many right parenthesis. Remove one:SELECT DATEADD(d,-1,CONVERT(DATETIME,CONVERT(char(4),YEAR(DATEADD(month,-1,getdate()))+LEFT(CONVERT(varchar,getdate(),10),2)+'01'))) |
 |
|
|
|
|
|
|
|