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 |
|
Adam West
Constraint Violating Yak Guru
261 Posts |
Posted - 2010-08-16 : 21:35:25
|
| SELECT SUM(Price) AS Pricetot FROM [Tech2].[dbo].[V_Dashboard_expenses] where cust_code = 'SRR' and Department = 'Dietary' and Date_Created between 20100701 and 20100731THis is crashing with this error messageMsg 8115, Level 16, State 2, Line 1Arithmetic overflow error converting expression to data type datetime.How can I state the dates better? |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2010-08-16 : 23:07:02
|
| [code]and Date_Created between '20100701' and '20100731'[/code]CODO ERGO SUM |
 |
|
|
|
|
|