Viewing 15 posts - 736 through 750 (of 7,608 total)
I thought later of one possible correction to removing the file extension, just in case two or more periods (.) appear in the value.
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER...
July 13, 2022 at 5:42 pm
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
CREATE FUNCTION [dbo].[fn_GetAlphabetsAndUnderscoresOnly]
(
@string VARCHAR(8000)
)
RETURNS VARCHAR(8000)
AS
BEGIN
DECLARE @invalidCharLocation SMALLINT
SET @string = LEFT(@string, CHARINDEX('.', @string + '.') - 1)
SET @invalidCharLocation = PATINDEX('%[^A-Za-z_]%',...
July 12, 2022 at 11:18 pm
The missing index suggestions are not connected to specific queries in versions prior to SQL Server 2019. SQL Server 2019 added the sys.dm_db_missing_index_group_stats_query DMV. This DMV tells...
July 12, 2022 at 7:52 pm
The missing index suggestions are not connected to specific queries in versions prior to SQL Server 2019. SQL Server 2019 added the sys.dm_db_missing_index_group_stats_query DMV. This DMV tells you which...
July 12, 2022 at 7:07 pm
Sorry for the confusion. Yes, as the data stands right now the entire column should be populated with an *. If the department column included 0001 and 0002, then...
July 11, 2022 at 1:10 pm
I'm not really sure what you're trying to do, but it sounds like something like this:
UPDATE tn
SET tn.[Export Deparment] = CASE WHEN Distinct_Department_Count = 1 THEN '*'...
July 8, 2022 at 9:21 pm
Also, since the table you are INSERTing to already exists, you need to INSERT to it, not SELECT ... INTO it:
Truncate TABLE Planning
Insert Into Planning
Select *
from (select...
July 8, 2022 at 4:56 pm
(2) Here's my answer:
CREATE TABLE dbo.emp_training ( id int IDENTITY(1, 1) NOT NULL, emp_id int NOT NULL, training_id int NOT NULL, status char(1) NULL CHECK(status IN ('F',... July 8, 2022 at 3:00 pm
Here's an alternative:
SELECT E.*, LEFT(ds.Item, CHARINDEX(')', ds.Item + ')') - 1) AS Invoice
FROM @ErrList E
CROSS APPLY (SELECT Item FROM dbo.DelimitedSplit8K(ErrDesc, '(') WHERE ItemNumber = 3) AS ds July 7, 2022 at 2:37 pm
On the missing index views? They just don't say anything. I'm not talking about all the other DMVs. They're vital. 1 million percent so. But the missing...
July 6, 2022 at 10:03 pm
Yeah, Cost Threshold for Parallelism is way too low. That is likely causing the crazy spikes in response/CPU times.
July 6, 2022 at 7:27 pm
On the missing index views? They just don't say anything. I'm not talking about all the other DMVs. They're vital. 1 million percent so. But the missing index DMVs?...
July 6, 2022 at 7:26 pm
I wonder what Jonathan's parallelism settings are, and other SQL settings that might affect the run times. Some of those results are definitely out of place.
July 6, 2022 at 6:06 pm
Generally speaking, the missing index recommendations taken from the DMV tables are useless. That's because they are not, and cannot be, linked to a given query. So you just...
July 6, 2022 at 5:52 pm
Viewing 15 posts - 736 through 750 (of 7,608 total)