Viewing 15 posts - 46 through 60 (of 74 total)
You need to check if the latches are on GAM, SGAM and PFS pages. If the contention is on those pages, then adding more files might help you. If the...
June 9, 2021 at 6:35 am
Are you sure that you are getting the same record as before? Is there a chance that you have something like select top 1 that today didn't get to the...
June 8, 2021 at 1:15 pm
You you can use the row_number() window function to generate the number. Here is an example:
create table test
(
FamilyId int,
PortionKey nvarchar(20),
GroupId int,
GeneratedNumber int
)
insert into test(FamilyId,PortionKey,GroupId,GeneratedNumber)
values
(12100,'ab',1,NULL),
(12100,'cd',2,NULL),
(12100,'eg',3,NULL),
(12100,'fb',4,NULL),
(12100,'am',1,NULL),
(12100,'fu',2,NULL),
(12100,'ab',3,NULL),
(12100,'cy',4,NULL),
(12100,'lf',1,NULL),
(12100,'ad',2,NULL),
(12100,'gb',3,NULL),
(12100,'mu',4,NULL)
go
with MyCTE as (
select...
June 7, 2021 at 8:24 am
You can use the IIF function - IIF(Person.Termination_Date IS NOT NULL, 'N', 'WhatEverYouWantInCaseOfNullHere')
Adi
June 7, 2021 at 7:56 am
Pending recovery means that for some reason recovery did not start and the SQL server is waiting for something to happen. Most times when it happened to me, it was...
May 31, 2021 at 12:56 pm
Have to admit that I don't think that this is a simple text manipulation, because it could get very messy. Depending on how many "conventions" were used in the code,...
May 20, 2021 at 2:00 pm
Modifying all the code to point to a new schema is a very hard task. Depending on the amount and complexity of your code, it might be a task that...
May 20, 2021 at 6:30 am
Most times that I've seen a dramatic improvement in performance after index rebuild it was due to the fact that statistics were also updated and the query plan was modified. ...
May 13, 2021 at 6:21 am
You can use the except operator. Here is an example that is based on your script
CREATE TABLE PEOPLE (
[PEOPLEID] [bigint] IDENTITY(10000,1) NOT NULL,
[NAME] varchar(250) NOT NULL);
CREATE TABLE...
May 12, 2021 at 8:05 am
I think that searching just for the first occurrence of the letter T is not good, because you can also have a file that has the letter T in it's...
May 12, 2021 at 7:49 am
It has been a while since I worked with AG, but from what I remember if you specify the listener name in the connection string and you don't use read...
May 11, 2021 at 9:17 am
DECLARE @Employees TABLE
(
ID smallint PRIMARY KEY,
FirstName varchar(30) NOT NULL,
LastName varchar(30) NOT NULL,
Status varchar(10),
Pay decimal(10,2),
JobType varchar(30) NULL
)
INSERT @Employees VALUES (1,'Jeff','Bagwell', 'Active', 250.75, 'Manager')
INSERT @Employees VALUES (2,'Jose','Lima', 'Active', 175.50,...
May 11, 2021 at 8:46 am
One more way (so you'll have 2 options:-))
with PartFamiliesToUse as(
SELECT PartFamilyID
FROM #partsFamily
where FamilyStatus = 'Active'
EXCEPT
SELECT PartFamilyID
FROM #partsFamily
WHERE FamilyStatus <> 'Active'),
Aggr as (
SELECT PFT.PartFamilyId, STUFF((SELECT '|' +...
April 29, 2021 at 6:53 am
You can use the convert function to specify which style you want to see. To get the style that you want you need to use style number 104 (you can...
February 3, 2021 at 11:45 am
There is no single number. It depends on many factors. For example - how often the code (e.g. stored procedure or function is being used), the code of the procedure,...
November 16, 2020 at 12:50 pm
Viewing 15 posts - 46 through 60 (of 74 total)