November 7, 2013 at 3:34 pm
Dear friends ,
being new to SQL i needed to know how to find -
“Work Order End Date_WO”is greater than “Previous Work Order Start Date_WO”
Note-both are in same format (date Time) as below:-
Work Order End Date_WO= "2013-01-10 00:00:00.000" and
Previous Work Order Start Date_WO = "2012-12-03 00:00:00.000"
Thanks
Dhananjay
November 7, 2013 at 4:18 pm
You're not new to SQL Server, you've been here long enough to keep posting simple questions.
Please read about data types and Comparison operators.
November 8, 2013 at 5:08 am
New in the sense for Date related stuff never worked with DATES in SQL much no worries i fgured out the solution.
thanks
Dhananjay
November 8, 2013 at 6:28 am
Well, if you're new to dates, the single best piece of advice I can possibly give you is to store dates in date fields. Don't use string data types or anything else to store a date or a point in time.
Once you get the basics down, Lynn has a good list of common date routines posted at http://www.sqlservercentral.com/blogs/lynnpettis/2009/03/25/some-common-date-routines/. Please make sure you understand the basics and how they work first. Dates are powerful when used properly and trouble when used improperly.
November 11, 2013 at 6:09 am
This one is also a good read.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply