Viewing 15 posts - 1,786 through 1,800 (of 6,676 total)
A part of the problem is doing the rounding inside the sum. I recommend that the rounding be done on the sum rather than inside it for both reasons...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 8, 2020 at 10:09 pm
Yes - you need to group the results. A couple of notes:
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 8, 2020 at 9:49 pm
What seems to be the problem?
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 8, 2020 at 9:05 pm
Since you are on 2016 and you don't have access to STRING_AGG, you can still use FOR XML.
Select Distinct
...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 8, 2020 at 9:02 pm
Here is what I was thinking - not tested and may need some refinement in the build of the temp tables. This all depends on how many rows can satisfy...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 7, 2020 at 4:54 pm
For the creation of the #Entity temp table.
I would move the join to Industry into the build of the #EntityIndustry table - and then move the join to #EntityIndustry into...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 6, 2020 at 10:32 pm
Is there more to this code than you have shown? I see several temp tables that are created - and never used. I also see an outer join to a...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 6, 2020 at 4:33 pm
I have no idea why Microsoft has kept that option in the product - auto shrink will cause massive fragmentation of the database every time it shrinks. It...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 6, 2020 at 4:12 pm
Just to confirm, COALESCE won't provide an improvement in performance over CASE, although it will make the code a whole lot easier. Behind the scenes, the optimizer converts a...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 6, 2020 at 3:40 pm
One other optimization that *may* be possible is to remove the CASE expression. I have to assume that if a match is found in #entity that the columns from that...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 6, 2020 at 3:07 pm
I have no idea why Microsoft has kept that option in the product - auto shrink will cause massive fragmentation of the database every time it shrinks. It is just...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 6, 2020 at 2:44 pm
After going down that rabbit hole, I stumbled on a way to at least start the service by bypassing the upgrade script. Once I was able to start MSSQLSERVER...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 6, 2020 at 2:38 pm
You can avoid errors where there are missing periods by making sure you always have 4 periods in the field. Here is one approach:
Select *
...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 5, 2020 at 5:07 pm
I guess I am confused - if you are going to be using SSIS then why would you need to use OPENROWSET to load the data into a table? SSIS...
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 5, 2020 at 4:21 pm
You need to specify the admin account that will be used - one that has sysadmin access to that instance of SQL Server.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
June 4, 2020 at 8:47 pm
Viewing 15 posts - 1,786 through 1,800 (of 6,676 total)