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 |
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2005-04-18 : 06:21:40
|
| I'm a bit confused about GETDATE. Sometimes if I put GETDATE I get a syntax error and sometimes if I put GETDATE() I get a syntax error. In most cases swapping to the other seems to work. Can anyone explain this?steveA sarcasm detector, what a great idea. |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-04-18 : 07:11:08
|
| GETDATE is a function, so I can't see how it will work without the parentheses. If you need another option, there's the ODBC version: CURRENT_TIMESTAMP. This has no parentheses. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2005-04-18 : 07:37:19
|
| Perhaps its what you are doing with the GetDate() [return value] that is causing the error?Kristen |
 |
|
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2005-04-18 : 08:07:45
|
I've finally sussed it! The GETDATE() was in an insert in a statement block. I'd forgotten to put an END in there Thanks guyssteveA sarcasm detector, what a great idea. |
 |
|
|
|
|
|