Viewing 15 posts - 1,681 through 1,695 (of 2,917 total)
This may or may not help, but if you turn Main_CTE into a table (temp table, table variable, physical table... not sure which will be the best for your use...
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, 2020 at 4:57 pm
Just to add to Sergiy's response - the "01" indicates that the value is positive. If the value was -126, then you'd get "00" in that octet instead. the "00"...
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, 2020 at 2:47 pm
I see one big glaring red-flag in that bit of code - you are calling ExecuteScalar() TWICE! So you are running the command against the SQL database TWICE! That will...
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 24, 2020 at 7:56 pm
How about something like this:
CREATE TABLE [#Temp]
(
[ID] INT
, [Status_ID] INT
, [StartDate] DATE
, [EndDate] DATE
);
INSERT INTO [#Temp]
SELECT
101
, 1
, '01/02/2020'
, '01/28/2020'
UNION ALL
SELECT
101
, 1
, '01/29/2020'
, '01/31/2020'
UNION ALL
SELECT
101
, 5
,...
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 24, 2020 at 7:46 pm
This looks like a gaps and islands type problem to me. I have a question about your data though - how many days after "EndDate" must a "StartDate" be to...
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 24, 2020 at 5:23 pm
Did some testing and digging on my end and best I can figure out is that you would need to either:
A - do calculations in your SQL query
B - create...
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 24, 2020 at 3:29 pm
Yeah, if you could calculate those values on the SQL side, this would be easy. But I enjoy a challenge!
I see where it gets difficult though - the divisor is...
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 24, 2020 at 2:48 pm
So, if I understand what you have properly, you don't have a "Fields!FTE.Value" that you can use to calculate the AVERAGE or the SUM?
I think the logic will be similar...
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 23, 2020 at 10:21 pm
My approach then would be something completely different then. If you are changing the back end disks I would do a completely different approach than what you are doing. Might...
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 23, 2020 at 8:55 pm
My process when i want to know things like that is to check the docs:
If you see here, the CommandType default when not assigned a value in this case is...
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 23, 2020 at 7:43 pm
Quick review of the code, the error isn't where you indicated. How do I know - that exact line is assigning an integer a value. That's it. It is 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 23, 2020 at 6:14 pm
What value do you expect to get when you sum up all of the FTE values? 19.525 is what you would get. If you take the average of all of...
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 23, 2020 at 5:59 pm
"no activity on the backup server" to me means "no backup jobs are running at this time from SQL", correct? Are you 100% confident that your work will fit 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 23, 2020 at 5:36 pm
Another thought - Visual Studio is 32-bit so the debugger is 32-bit. SSIS is going to be 64 bit. Just thinking of other things that may affect performance...
What happens to...
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 23, 2020 at 2:02 pm
Is it the same account on the old system (NT Service\SQLSERVERAGENT) or do you have an actual account for it?
The proxy account will likely be your only option on 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 22, 2020 at 10:08 pm
Viewing 15 posts - 1,681 through 1,695 (of 2,917 total)