Viewing 15 posts - 2,656 through 2,670 (of 7,609 total)
Isn't the physical machine name different?
SELECT SERVERPROPERTY('ComputerNamePhysicalNetBIOS')
October 22, 2019 at 4:35 pm
Is the report not able to do a LEFT JOIN instead of an INNER JOIN? That would be the standard way to do that, without having to create a dummy...
October 22, 2019 at 2:58 pm
You might want to consider assigning an alias to the modified value, so that if it ever changes later the definition of it is only in 1 place:
October 21, 2019 at 8:01 pm
Maybe this will give you what you want:
--** Data set up ***************************************************************
CREATE TABLE dbo.questions (
question_id int PRIMARY KEY,
question varchar(1000)...
October 21, 2019 at 5:19 pm
SSIS is a good (enough) tool, for what it does. It is actually very good at moving data around, to/from SQL Server and other platforms as well.
SSIS also has another...
October 21, 2019 at 4:50 pm
case
when columnA <> 0
then columnB = 1
else columnB
end
The main thing to understand about CASE is that every result from a CASE must be a single value. The expression leading to...
October 17, 2019 at 5:34 pm
Certain errors by default won't fail the entire transaction/batch. Before the transaction, use:
SET XACT_ABORT ON
to make SQL fail the entire transaction if an error like that occurs.
October 15, 2019 at 9:48 pm
I think we may have interpreted the q differently. I took "statistics i/o" to mean the results from:
SET STATISTICS IO ON;
The logical i/o results are directly comparable, aren't they?
I think maybe...
October 15, 2019 at 5:52 pm
Really it's best to use them in combination.
High I/O numbers tell you to look for better ways to do related part(s) of a query. The execution plan shows you what...
October 15, 2019 at 2:21 pm
Something along these lines:
ALTER TRIGGER [dbo].[trig_UpdatePlacementCount]
ON [dbo].[DebtorHistory]
AFTER INSERT, UPDATE
AS
BEGIN
SET NOCOUNT ON;
UPDATE DI
SET placement_count = dh.file_no_count
FROM dbo.DebtorInfo DI
INNER JOIN inserted i ON i.file_no = DI.file_no
INNER JOIN (
...
October 14, 2019 at 2:28 pm
You could do comparisons after the fact using the auditing data, but that would be big overhead.
You don't need separate triggers for the original trigger to indicate which column(s) were...
October 11, 2019 at 5:35 pm
The problem with the all digits string is it can be mistaken for an integer.
100% false. Date literals are strings, or delimited in some other way to distinguish them from...
October 11, 2019 at 5:13 pm
This might give better performance, if the optimizer recognizes the chance:
WHERE AKey LIKE '[ABCDEGJ]%' AND (AKey LIKE 'AAA%' OR AKey LIKE 'BBB%' OR AKey LIKE 'CCC%' OR...
October 10, 2019 at 5:36 pm
And if my suggestions are broken, are so bad, why do the recent DATE and DATETIME2(n) data types default to it?
Default to what exactly? We know they're not stored in...
October 10, 2019 at 5:27 pm
I disagree; when at all possible, you want to make the clustered index unique yourself whenever possible. Yes, SQL will always force it to be unique anyway, but that often...
October 10, 2019 at 3:21 pm
Viewing 15 posts - 2,656 through 2,670 (of 7,609 total)