Viewing 15 posts - 1 through 15 (of 17 total)
Luis Cazares (6/23/2016)
We have data types for a reason, using strings to handle values is lazy...
June 23, 2016 at 1:52 pm
dhaveedh (6/23/2016)
None of your links present any information to support your assertion that 2002-02-28 00.00.00.000 is not a valid date. The ISDATE function even confirms it is a date.
So...
June 23, 2016 at 12:26 pm
Luis Cazares (6/23/2016)
It is a valid date.What do you mean by "the correct error checking functions"?
http://www.w3schools.com/sql/sql_dates.asp
http://www.w3schools.com/sql/func_convert.asp
https://msdn.microsoft.com/en-us/library/ms187347.aspx ( ISDATE() Function)
https://technet.microsoft.com/en-us/library/ms179465(v=sql.105).aspx ( Handling Database Engine Errors )
http://sqlmag.com/t-sql/t-sql-best-practices-part-2 (See datetime best practices section)
But...
June 23, 2016 at 10:47 am
dhaveedh (6/23/2016)
In your last post you said SELECT CONVERT(Datetime, '29-Feb-2') returns an error because SQL Server does not accept single digit years?
Why does SELECT CONVERT(Datetime, '28-Feb-2') return 2002-02-28 00.00.00.000 without...
June 23, 2016 at 10:09 am
Jeff Moden (6/23/2016)
No need for the sarcasm. You made an incorrect statement that newbies would misinterpret and I made sure they weren't mislead.
Shifting gears to the subject at hand,...
June 23, 2016 at 8:31 am
dhaveedh (6/21/2016)
I do not think that the article ever implied or attributed any bug to SQL Server. It was merely highlighting how SQL Server was dealing with the bad data...
June 21, 2016 at 7:45 am
Jeff Moden (6/20/2016)
trboyden (6/20/2016)
SQL Server expects the date to be passed in as "2016-06-20 00:00:00"
That's not true at all. SQL Server will take a couple dozen date/time formats in...
June 21, 2016 at 6:39 am
It's not so much a critique of the original code which I would expect you would understand needs refactoring. However, one should expect strange outcomes when data is passed to...
June 20, 2016 at 7:38 am
I wouldn't call it a SQL Server issue. SQL Server expects the date to be passed in as "2016-06-20 00:00:00" which is the standard SQL Server datetime format. So if...
June 20, 2016 at 5:42 am
agtcovert (7/24/2015)
First, talk to...
July 24, 2015 at 6:51 am
While I don't disagree that a basic NAS versus a basic SAN is slower at a general level, in reality there is a lot more to it than that, and...
July 24, 2015 at 6:38 am
Scott D. Jacobson (4/26/2012)
July 24, 2015 at 5:30 am
Phil Parkin (7/10/2015)
OK, I roundly disagree with your absolute statement:
"Thus advocating the approach is improper."
Here is a part of a setup script I wrote recently. I developed it on...
July 10, 2015 at 8:51 am
Phil Parkin (7/10/2015)
I agree with you for production code. The general thrust of the thread, however, is around the creation of utility or setup scripts which are run and debugged...
July 10, 2015 at 7:04 am
As a point of clarity in code purpose, re-usability, script length, and the "what the heck was this guy thinking" factor, I find commented out code to be a poor...
July 10, 2015 at 5:33 am
Viewing 15 posts - 1 through 15 (of 17 total)