Viewing 15 posts - 1,261 through 1,275 (of 6,676 total)
CASE, ISNULL and COALESCE are all an integral part of SQL Server and follow its general syntax. It's because IIF is so unlike other other functions and expressions in...
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
March 1, 2021 at 7:21 pm
Under the hood SQL Server converts an IIF to a CASE
There are uses for IIF - just the same as CHOOSE and other shortcut features that...
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
March 1, 2021 at 6:16 pm
Here is an alternative that doesn't require the use of CASE or IIF:
Declare @testTable Table (var1Title varchar(30), var1Topic varchar(30), var1Name varchar(30));
Insert Into @testTable (var1Title, var1Topic, var1Name)
...
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
February 27, 2021 at 4:51 pm
--===== Create and populate the test table
DROP TABLE IF EXISTS #TestTable;
CREATE TABLE #TestTable
(begin_time...
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
February 25, 2021 at 8:36 pm
Look at using OUTPUT instead of a SELECT/INSERT method (https://docs.microsoft.com/en-us/sql/t-sql/queries/output-clause-transact-sql?view=sql-server-ver15)
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
February 24, 2021 at 9:59 pm
yea please ignore the nolock hints. its what developer do and we always omit when we commit.
Attaching Execution plan for one of case
If you keep this line 'SET TRANSACTION...
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
February 24, 2021 at 7:21 pm
There is a schema change report - it might contain that information if the trace data is still available. I would check there first - right-click on the database in...
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
February 24, 2021 at 7:09 pm
If tempdb is growing every time you run this package - that indicates another process somewhere that is shrinking the files. You should not be shrinking the files...reset the size...
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
February 24, 2021 at 6:59 pm
If you remove a database from the AG - and then that database back before a new transaction log backup has been run, then SQL Server can synchronize that 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
February 24, 2021 at 4:54 pm
First I tried the PowerShell ISE route by saving my query to a file ...
I'm not a fan of PowerShell. I use it very infrequently, and as a...
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
February 23, 2021 at 9:46 pm
What is the code in D:\MyFile.sql?
The 'Select' needs to select one of the available columns in $recordData - which will be defined by the query in D:\MyFile.sql. If you query...
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
February 23, 2021 at 9:45 pm
I think you really need to look at SYNONYMS and use them in your code/refactoring processes. If you have been good about schema qualifying your objects - it would be...
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
February 23, 2021 at 7:07 pm
To import xlsx files (in both 2015 and 2017), you need to install the ACE drivers. Ideally, you should install both the 32- and 64-bit versions. This link...
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
February 22, 2021 at 8:20 pm
The reason your Powershell script didn't work as expected - is because you did not include the necessary items in the command:
$recordData = Invoke-SqlCommand -ServerInstance {your server...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
February 22, 2021 at 8:04 pm
If you reread what I wrote, you would see that I don't agree with creating a view for future proofing.
I stated that using a view for refactoring is acceptable and...
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
February 21, 2021 at 2:38 am
Viewing 15 posts - 1,261 through 1,275 (of 6,676 total)