Viewing 15 posts - 1,186 through 1,200 (of 2,917 total)
I would recommend looking into Truth Tables. But basically, what the approach is doing is if condition1 AND condition2 are both TRUE, then use the first option. If EITHER condition...
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.
May 20, 2021 at 7:15 pm
I think that is possible, but not QUITE the way you wrote it. What I think you would need to do (I don't have your data or any DDL 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.
May 20, 2021 at 5:55 pm
Kind of. Anything that needs to authenticate as that account will fail. Anything that has previously authenticated will work fine. SO, the SQL instance will continue to run without problems,...
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.
May 20, 2021 at 5:41 pm
I sometimes do use the table name as the alias. The reason I do this is that SQL Prompt SQL Format will automatically add the alias onto my columns IF...
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.
May 18, 2021 at 4:40 pm
Two thoughts. First, does:
EXEC SP_who2
give you any results for a user connected to the database test1? If there are a lot of connections, it can be a...
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.
May 18, 2021 at 4:25 pm
Happy to help.
I didn't cover EVERY scenario, I just covered some. For example, if you have an IP allowed list and ONLY a small set of IP addresses are allowed...
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.
May 18, 2021 at 4:17 pm
The actual rule we have in place isn't specific to single character aliases though. Our rule is that aliases and variable names must be specific enough to identify the object....
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.
May 17, 2021 at 10:18 pm
Since you have all the hard work done, all that's left is to put the table names in and define how you want to join them. Since you have a...
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.
May 17, 2021 at 9:23 pm
I think this post will tell you how to do it:
https://stackoverflow.com/questions/49741600/database-stuck-in-a-single-user-mode-in-sql-server
To paraphrase, run
SELECT spid
FROM master..sysprocesses
WHERE spid > 50 AND dbid = DB_ID('<Your_DB_Name>')
and kill that SPID.
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.
May 17, 2021 at 5:46 pm
To add to what Pietlinden said, we also have no visibility into that function. You MAY be able to tune the function.
As far as I know, using a table valued...
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.
May 17, 2021 at 5:43 pm
I am not sure why you marked the previous answer as spam when it (as you said) answered your "initial question" but was not what you were expecting.
If you followed...
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.
May 17, 2021 at 4:06 pm
I'd probably start by writing it in a manner that is easier to see and read (my preference, not required). So something like:
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.
May 17, 2021 at 3:56 pm
If the database names and table names are static and not going to change (ie no new ones coming in and none going away), then I'd recommend hard-coding it all...
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.
May 14, 2021 at 9:55 pm
Happy to help.
Also, thanks for the follow-up! It is always nice to hear if a solution helped or not and what the final solution ended up being.
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.
May 14, 2021 at 7:36 pm
First step would be to tell us the error as the error likely says how to fix it.
My GUESS is that you are getting a "invalid column name" error which...
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.
May 14, 2021 at 6:02 pm
Viewing 15 posts - 1,186 through 1,200 (of 2,917 total)