Viewing 15 posts - 2,071 through 2,085 (of 2,883 total)
With a cursor that should be pretty easy to do.
Something along these lines:
DECLARE @dynamicCount VARCHAR(MAX)
DECLARE @dynamicDelete VARCHAR(MAX)
DECLARE @tblResult TABLE (ID INT IDENTITY(1,1), [Query] VARCHAR(MAX) )
DECLARE cur CURSOR...
February 10, 2020 at 10:02 pm
I think cursors will be your friend here.
Do a cursor with your select from above and store both into variables then loop through the cursor to execute both SQL statements...
February 10, 2020 at 9:09 pm
First step would be to check the execution plans for both of these.
Make sure you are getting the same plan in both cases. If you are getting different plans, this...
February 7, 2020 at 9:48 pm
I think there is a typo in the answer as it describes query number 2 in the answer but mentions a WHERE clause which only exists in Query number 3. ...
February 7, 2020 at 3:54 pm
Can you post the entire result of "summary.txt" file (C:\program files\microsoft sql server\130\setup bootstrap\log\summary.txt)? That usually has the best information about why an install failed.
The messages you psoted there do...
February 4, 2020 at 8:44 pm
does the query COMPLETE in 0 seconds OR does it show you the execution plan in 0 seconds?
February 4, 2020 at 5:42 pm
This is a big "it depends" answer. When you say you are running 15-20 packages daily as "a lot of packages", it makes me wonder how bad my setup is...
February 3, 2020 at 9:05 pm
Just to throw my 2 cents in this, I have a quick and dirty little script template that I did up ages back to help with sp_who2:
DECLARE...
January 29, 2020 at 4:19 pm
Was working with a different forum member (Sue_H) and she pointed me in the right direction and pointed me to a process I did that is likely the culprit -...
January 27, 2020 at 9:50 pm
Hello Jeff,
Thanks for the reply. As for the reboot, I had to do some maintenance on our servers on the 18th and at that time we rebooted them. Unfortunately, rebooting...
January 27, 2020 at 2:03 pm
My advice - test everything that you want to be certain works after the upgrade. I would test a backup, a restore, dbcc checkdb, update statistics, reorganize indexes, all features...
January 21, 2020 at 7:16 pm
I was reading that document from microsoft too and I think I interpreted it differently (and incorrectly) than everyone else. I read it as the order is not guaranteed as...
January 21, 2020 at 2:10 am
A different approach would be to tackle this at the application level. The application will grab the entire string from the database and split it in C# (or whichever language...
January 20, 2020 at 7:28 pm
Something to note - SOMETIMES using a CTE and temp table together will give better performance. SOMETIMES it is better to look at using JOINs instead of CTEs. And sometimes...
January 20, 2020 at 5:59 pm
Admingod - first, do not hijack posts. Your question is not related to the OP except for the fact that it is about partitioning.
Second, did you read the post I...
January 16, 2020 at 2:11 pm
Viewing 15 posts - 2,071 through 2,085 (of 2,883 total)