Viewing 15 posts - 856 through 870 (of 7,191 total)
Sounds like you have a lot of unused indexes, yes. But you need to consider how long it is since the DMVs were reset (usually the last time SQL Server...
March 5, 2018 at 8:39 am
what I'm not clear about is when to completely remove a particular...
March 5, 2018 at 8:22 am
Number the rows in the StartPoint CTE using ROW_NUMBER(). Then, instead of using LEAD in the StartPointsandNext CTE, join StartPoint to itself on RowNo = RowNo + 1.
John
March 5, 2018 at 7:39 am
DECLARE @Contents varchar(4000)
SET @Contents =
'abcdef 01/01/2018 08:15:13 This is a note , this is a note , this is a note , this is a...
March 5, 2018 at 7:09 am
Is it possible that "this is a note" will contain six letters followed by a date and time?
John
March 5, 2018 at 4:40 am
Sorry, but you've confused me. First you said the source is SQL, now you're saying it's .txt. But if it's .txt, just bring it into a staging table - as...
March 2, 2018 at 9:58 am
WITH Grouped AS (
SELECT
Account
, Date
, SUM(Amount) OVER (PARTITION BY Account, Date) AS Amount
, RecID
FROM #MyTrans
)
SELECT
Account
, Date
March 2, 2018 at 7:11 am
Please will you show us what you've already tried, because it's not clear where you're stuck?
The best advice is to change the design - there's no way you...
March 2, 2018 at 2:10 am
March 1, 2018 at 1:56 am
Memory see on task manager :
--Sqlserver.exe : 135 MB now (2756 before restart)
--Reporting...
March 1, 2018 at 1:54 am
Do it exactly as Drew showed you, but in the ZATS column, you only need ZATS = b.HTS_NUMBER - you don't need the subquery there.
John
February 26, 2018 at 9:47 am
This should get you started. It relies on INs and OUTs being properly in sequence. If they're not, you'll need to deal with that first.
WITH InandOut...
February 26, 2018 at 9:43 am
Yikes! A correlated subquery. You could try putting this query into a CTE and joining to it on Part_Number = composite_Part and RowNo = 1.
SELECT
...
February 26, 2018 at 9:28 am
Have you tried AT TIME ZONE instead?
John
February 26, 2018 at 8:14 am
Viewing 15 posts - 856 through 870 (of 7,191 total)