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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-12-11 : 09:43:32
|
| daniela writes "Hi,I'm moving from Access to SqlServer and I need to make some modification to my Visual Basic code.I need to know if the following query is still valid for SqlServer:SELECT * FROM myTableWHERE Month(myDate)=5 AND Year(myDate)=2001Thank you very much!Daniela" |
|
|
JustinBigelow
SQL Gigolo
1157 Posts |
Posted - 2001-12-11 : 09:53:55
|
| You will need to replace the Month() and Year() functions with the datepart() function in sqlserver.datepart(m, mydate)=5datepart(yy, mydate)=2001see Books On Line for more info on the datepart function.hth,Justin |
 |
|
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2001-12-11 : 10:43:30
|
| Actually, Month and Year are still valid functions in SQL 7. I'm not sure about 2KMike "A program is a device used to convert data into error messages." |
 |
|
|
|
|
|