Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a calculated field
Message
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01486104
Message ID:
01486112
Views:
37
>>I know I have this one somewhere in my code but I can't find it. Basically, the goal consists of doing a query and have a condition which implies a calculation on two fields. For example, I need to get all the records where AddDate+NumberOfDay would be less than today.
>
>
>...
>  WHERE AddDate+NumberOfDay < DATEADD(day, DATEDIFF(day, 0, getdate()), 0)
>
Check Operand type clash: date is incompatible with int error when trying to do +1 on a date data type in SQL Server 2008
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform