Viewing 15 posts - 931 through 945 (of 2,648 total)
There is a thread on stackoverflow about this with various different solutions:
January 20, 2021 at 8:06 pm
SSMS proposed me to create a composite NC index on Date_deleted, group_id, last_name, firt_name. Does it mean that I can remove indexes on last_name and first_name and create the...
January 20, 2021 at 7:34 pm
Dear Group:
I am not sure if this is a T-SQL / SSMS issue, or Excel, so if this is off-topic please accept my appologies. I am hoping there is...
January 18, 2021 at 12:14 pm
((1 OR 2) OR (6 OR 7 OR 8)) AND 3 AND 4 AND 5
Is exactly the same as:
(1 OR 2 OR 6 OR 7 OR 8) AND 3 AND...
January 15, 2021 at 3:47 pm
So we have this third party shipping system that is...well...user hostile at best. To add insult to injury for the users the system has been suffering increased performance problems...
January 14, 2021 at 8:09 pm
You need to start by looking at the view definition of vwRequests
January 6, 2021 at 6:20 pm
If all the columns you require are not contained in the non-clustered index then the database would have to do a seek and a key-lookup or a full table scan...
January 6, 2021 at 2:13 am
INSERT INTO tblWorking
(
Col1,
Col2,
Col3,
...
)
SELECT Col1,
Col2,
...
January 3, 2021 at 12:58 pm
CREATE TABLE #Employee
(
EmpId int NOT NULL,
EmpName nvarchar(20) NOT NULL
);
GO
CREATE TABLE #Swipe
(
SwipeTime_UTC datetime NOT...
January 2, 2021 at 4:48 pm
IF OBJECT_ID('tempdb..#Data', 'U') IS NOT NULL
DROP TABLE #Data
GO
select *
into #Data
from (values
(1,'A',1),
(2,'B',1),
(3,'A',1),
(3,'A',2),
(4,'B',1),
(5,'A',1),
(5,'B',1),
(6,'A',1),
(6,'A',2),
(6,'A',3),
(7,'A',1),
(8,'A',1),
(9,'B',1)) x(Id,SubType,Ref)
GO
select Id, SubType, Ref,
... December 31, 2020 at 3:09 am
"I am trying to count the number of customers that signed up in the last hour "
select COUNT(*)
from #CUSTOMERS
where CREATE_DATE > DATEADD(HOUR,-1,CURRENT_TIMESTAMP)
December 17, 2020 at 4:59 pm
Are you terminating the preceding statement with a semicolon?
You can start statements that begin with "WITH" with a semicolon:
;WITH ret AS(
December 11, 2020 at 12:50 pm
declare @Seconds int = 31578
select @Seconds [@Seconds],
t.Hours,
u.Minutes,
...
December 2, 2020 at 4:10 pm
If you don't already have similar indexes try these two indexes and see if there is an improvement:
create index IX_Cuentas_1 on dbo.Cuentas(idCuenta) INCLUDE (idjerarquia,Cuenta)
create index IX_Cuentas_2 on...
December 1, 2020 at 8:14 pm
--DECLARE @CurrentDate as date='2020-11-25'
DECLARE @CurrentDate as date='2020-12-10'
;WITH Data (Id, WeekName, WeekDate) AS (
SELECT 5, 'Gameweek 1', CONVERT(date,'2020-12-01')
UNION
...
November 26, 2020 at 1:05 pm
Viewing 15 posts - 931 through 945 (of 2,648 total)