Hey all I have a column (SysEntryDate) that has dates stored in a text field in the format: dd-mm-yyyy hh:mm:ss
(e.g. 1-3-2006 12:2:23 )
I am trying to filter all records that occur in a given month and year, e.g. below:
Unfortunately I keep getting arithmetic overflow errors with the datetime conversions.
So, I thought, f-it. I will use a regular expression then to do my bidding since I know the format of the text field. But lo and behold it looks like SQL Server 2000 doesn't support Regular Expressions! :-(
Any recommendations on getting around this number?
Any and all help is GREATLY appreciated!
Sean.![[peace] [peace] [peace]](/data/assets/smilies/peace.gif)
(e.g. 1-3-2006 12:2:23 )
I am trying to filter all records that occur in a given month and year, e.g. below:
Code:
SELECT COUNT(TheName) AS [Count], MONTH(CAST(SysEntryDate AS datetime)) AS SysMonth,
YEAR(CAST(SysEntryDate AS datetime)) AS SysYear
FROM dbo.Request
WHERE SysMonth = "3" AND SysYear = "2006"
GROUP BY TheName, MONTH(CAST(SysEntryDate AS datetime)), YEAR(CAST(SysEntryDate AS datetime))
Unfortunately I keep getting arithmetic overflow errors with the datetime conversions.
So, I thought, f-it. I will use a regular expression then to do my bidding since I know the format of the text field. But lo and behold it looks like SQL Server 2000 doesn't support Regular Expressions! :-(
Any recommendations on getting around this number?
Any and all help is GREATLY appreciated!
Sean.
![[peace] [peace] [peace]](/data/assets/smilies/peace.gif)