Viewing 15 posts - 1,261 through 1,275 (of 6,679 total)
Sorry, hit enter. It would be good to understand if you want 1 or 2 fields in the result. The way you write this, I'm not sure. I think...
March 1, 2021 at 8:21 pm
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...
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...
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)
...
February 27, 2021 at 4:51 pm
--===== Create and populate the test table
DROP TABLE IF EXISTS #TestTable;
CREATE TABLE #TestTable
(begin_time...
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)
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...
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...
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...
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...
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...
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...
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...
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...
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... February 22, 2021 at 8:04 pm
Viewing 15 posts - 1,261 through 1,275 (of 6,679 total)