Viewing 15 posts - 991 through 1,005 (of 2,917 total)
I must be misunderstanding. When I run the example you gave above, I get the expected output you gave above minus the Total and Grand Total values.
When I run the...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 29, 2021 at 4:20 pm
Can you provide some sample data where this happens?
Giving the text explanation that you did, I am not able to reproduce the problem.
If I had to guess, I would say...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 29, 2021 at 3:03 pm
My understanding of the error - the particular database file has no room to shrink. If there is 0 bytes free in that database file (or near 0), then it...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 28, 2021 at 10:10 pm
I agree with Scott and I have a question for you Ram too - how often do these jobs run?
This is relevant because if you run the jobs nightly (for...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 28, 2021 at 9:15 pm
I am pretty sure you cannot do this with UNION. UNION is for combining 2 data sets, not for filtering or reducing a data set. Using your query, you would...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 28, 2021 at 8:38 pm
I could be mistaken, but a value of ".247888" is going to be interpreted as a string as it doesn't start with a numeric value. What I mean is in...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 28, 2021 at 5:33 pm
As a thought (probably not the most efficient resolution), but toss the above query into a CTE (or nested select) and add a WHERE clause onto the final select where...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 28, 2021 at 3:20 pm
Your query will give you the channel, MEID and the sum of the charges, which is half the battle. But I would take the approach I suggested with windowing functions...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 27, 2021 at 8:47 pm
That was a code formatting error... I have corrected the code.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 27, 2021 at 7:40 pm
Looking at the code and just spitballing an idea, if you order the data by Name first and by ID second, you can use lead to see if the length...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 27, 2021 at 7:04 pm
First question - what have you tried?
To me, unless I am misunderstanding it, this sounds pretty easy using windowing functions to handle the first 1/2 and then the total becomes...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 27, 2021 at 6:56 pm
This is actually pretty easy to do based on what you put there. Step 1, set Saturday as your start date by running:
SET DATEFIRST 6
Next, you are...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 27, 2021 at 3:27 pm
Before doing a trigger, may not hurt to look at other options. Extended events for example.
Triggers can be painful if you forget to drop them when you are done.
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 26, 2021 at 5:12 pm
Are the indexes created before or after populating the data? I would encourage you to create them AFTER populating the data OR rebuild them after populating the data.
Backups don't modify...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 26, 2021 at 4:08 pm
My understanding - that shouldn't ever happen.
If the data isn't changing, the data shouldn't be getting fragmented. INSERT, UPDATE, and DELETE operations would cause fragmentation, SELECTs shouldn't.
My guess - something...
The above is all just my opinion on what you should do.
As with all advice you find on a random internet forum - you shouldn't blindly follow it. Always test on a test server to see if there is negative side effects before making changes to live!
I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.
July 26, 2021 at 3:47 pm
Viewing 15 posts - 991 through 1,005 (of 2,917 total)