Viewing 15 posts - 1,606 through 1,620 (of 6,676 total)
The first part of the problem is how you are generating the tally - you are generating too many rows. The second part of the problem is the return from...
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
September 18, 2020 at 4:21 pm
In your original post - you stated that the database engine was not used. However, it seems it is being used - probably by SQL Server Agent and the MSDB...
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
September 14, 2020 at 6:37 pm
What is the state of the primary database - not the secondary database?
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
September 14, 2020 at 5:22 pm
Hi @jeff Moden, @Jeffrey Williams,
Is there any way to achieve this through STUFF() function. Since I am having SQL server 2014.
Thanks
Did you see what I posted?
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
September 14, 2020 at 4:40 pm
The error tells you what the problem is - the database in production is set to single user. After restoring the database in production - change it to multi-user: ALTER...
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
September 13, 2020 at 4:15 pm
What about using a GIT repository? You get the advantage of being able to search the code as well as versioning, branching, etc...
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
September 12, 2020 at 4:32 pm
I start with how many full backup files I want to keep local to the system - then what process will be utilized and how will that affect the storage. ...
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
September 12, 2020 at 4:25 pm
Taking Jeff's sample data and example using STRING_AGG:
With ctePreAgg
As (
Select CountryID
,...
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
September 11, 2020 at 4:33 pm
It's a good question. I don't get to decide, the business do. The rules are arbitrary so I have to use a fixed table, in fact several. This (table...
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
September 10, 2020 at 9:11 pm
Since a view is just a named query - it will be optimized into the outer query referencing the view. If there are tables/views/columns that are not utilized in the...
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
September 10, 2020 at 7:57 pm
You are welcome - which version did you end up using?
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
September 10, 2020 at 7:45 pm
Look at the function STRING_AGG which should do exactly what you are needing.
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
September 10, 2020 at 7:39 pm
You may be interested in this script: https://www.sqlservercentral.com/?p=3787591&post_type=ssc_script&preview_id=3787591
This script generates the calendar for a 3 year period - with the ability to restate the calendar - and generates the 4-5-4,...
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
September 10, 2020 at 4:01 pm
Here is one method - you can extend as needed:
$badFile = "C:\Temp\badfile.csv";
$goodFile = "C:\Temp\goodfile.csv";
Import-Csv -Path C:\temp\testfile.csv -Delimiter "|" -Header (1..12) |
Group-Object -Property {$_.1...
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
September 9, 2020 at 10:25 pm
If the totals are already aggregated this way - then you can do this:
With currentYear
As (
Select t.Country
...
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
September 8, 2020 at 7:19 pm
Viewing 15 posts - 1,606 through 1,620 (of 6,676 total)