Viewing 15 posts - 1 through 15 (of 652 total)
A very valid question I thought, but one that's more about NOLOCK than EXCEPT, and the explanation should have included the comments later added.
June 8, 2022 at 7:09 am
What's "crazy" isn't the final sign. It's that SQL doesn't recognize unary minus. In math, and in every ordinary programming language I've ever encountered, unary operators have higher precedence...
June 9, 2020 at 12:54 pm
I don't really understand the explanation. In what was is anything "crazy" about the handling of negatives? Whatever the precedence you end up dividing a negative by a negative, which...
June 9, 2020 at 7:16 am
Not to nit-pick, but the option is actually called ANSI_NULL_DFLT_OFF, so technically, all the answers are incorrect.
However, the database option is called ANSI_NULL_DEFAULT, which can be set to OFF...
November 25, 2019 at 9:09 am
However, if it were a varchar
, why would you be converting it to a varchar
..? Style codes only affected when convert to or from a varchar
from another data type....
October 25, 2019 at 11:01 am
The answer depends on the data type of dbo.SalesHeader.OrderDate. If it's a datetime or similar then the answer is 6 as given. But if it's a varchar column then the...
October 25, 2019 at 10:31 am
None of the answers is correct. You can index a computed column based on a float as long as it is persisted.
October 15, 2019 at 9:02 am
Ignoring the fact that the dates are a week apart 😉
I did a search before replying and that told me that Colorado is also on daylight savings time in May,...
May 21, 2019 at 8:55 am
Guessed right but for the wrong reason.
Must admit, I don't quite see the point in teaching us about a feature that most of us have probably never heard of...
February 8, 2019 at 1:52 am
Stewart "Arturius" Campbell - Thursday, January 10, 2019 12:09 AMNice, easy question, thanks Steve
Easy until I checked the documentation to "confirm" what...
January 10, 2019 at 4:22 am
December 6, 2018 at 3:43 am
it also makes no attempt to validate the string you pass in, soSELECT PARSENAME('x.y.z', 3)
will always return 'x'
ie it's a simple string-parsing method.
Surely...
December 6, 2018 at 2:40 am
also not so easy for anyone who answers based on the actual question 😉
November 22, 2018 at 2:25 am
Personally I would cast everything in sight to a decimal - implicit conversions are a complete pain, explicit casting will guarantee the correct result.
October 19, 2018 at 1:56 am
I don't think that's the right answer. It always returns nvarchar - but if the input is invalid then the nvarchar value is NULL
If you run select...
October 4, 2018 at 4:28 am
Viewing 15 posts - 1 through 15 (of 652 total)