Viewing 15 posts - 1,321 through 1,335 (of 7,616 total)
You're welcome. Thanks for the feedback.
If you would mark it as the answer, it could help people looking at this later, as they will then know the q has been...
August 24, 2021 at 6:31 pm
Our situation appears to be quite a bit different than yours (and no... neither is wrong, IMHO... they're just different because of different business requirements). My best friend, who...
August 24, 2021 at 6:29 pm
I think FULL OUTER JOIN is what you need here:
SELECT
COALESCE(sales.mth, receipts.mth) AS mth,
COALESCE(sales.yr, receipts.yr) AS yr,
...
August 24, 2021 at 3:49 pm
Correct. We never do multiple named instances on a server. Heh... they still haven't found the body of the last person that tried to do that on our servers....
August 24, 2021 at 3:37 pm
SQL Server will install some things on the C: / main Windows drive regardless of what you do.
The windows teams have a nasty habit of installing SQL Server on...
August 23, 2021 at 10:18 pm
Better to script out the indexes; sp_helpindex doesn't show INCLUDEd columns, for one major failing.
A simple sys.sp_helptext on the view to show us its definition is fine.
August 23, 2021 at 10:06 pm
You could do some major clean up on your existing code:
...6. Since Write_Error_Log is called *so many* times, need to see the code for it too. It needs to...
August 23, 2021 at 6:31 pm
It also looks like you're querying a view for oeordlin rather than the actual table. If you are using a view, the text for that view would help us a...
August 23, 2021 at 6:19 pm
Presumably yes, for the same reason. The total I/O will be spread across two files rather than one.
August 20, 2021 at 6:43 am
SELECT LEFT(first_name, 10) + CASE WHEN LEN(first_name) > 10 THEN '...' ELSE '' END AS first_name
FROM @t1
August 19, 2021 at 10:20 am
I've noticed, and been impressed by, the overall great performance of the ROW_NUMBER() functions.
August 18, 2021 at 8:28 pm
It's still a falsehood. The docs say it is the "false_value", but the result is not "false". ELSE is accurate, because that simply means the WHEN condition was...
August 18, 2021 at 5:17 pm
The rule for SQL expressions and functions is that if a NULL value goes in, a NULL value comes back, unless you explicitly do something to change that.
IIF violates, in...
August 18, 2021 at 3:55 pm
I assume you replace any functions where CASE can be used - or is it only IIF that you don't use?
Like a COALESCE with 10 arguments, for example....
August 18, 2021 at 3:38 pm
Viewing 15 posts - 1,321 through 1,335 (of 7,616 total)