Viewing 15 posts - 76 through 90 (of 10,143 total)
But this one doesn't return NULL, so a bit puzzling to me
SELECT CHOOSE((CAST(T.[Rand]* 10 AS INT))%3.00 + 1, 'one', 'two', 'three') Choice,
...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 15, 2019 at 7:12 am
But this one doesn't return NULL, so a bit puzzling to me
SELECT CHOOSE((CAST(T.[Rand]* 10 AS INT))%3.00 + 1, 'one', 'two', 'three') Choice,
...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 14, 2019 at 1:17 pm
Links should be fixed here.
Works for me. Thanks Steve.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
August 5, 2019 at 8:06 am
Comments posted to this topic are about the item Making Good Use of SQL Server Auditing.
The link is to a Tony Davis article about Data Compression. [ Now...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 25, 2019 at 10:08 am
Your script contains two queries, do you know how much of the total execution time each one takes?
Can you provide an execution plan for each of them, as a .sqlplan...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 3, 2019 at 10:54 am
So, I don't want to argue through all this. We had a number of things, not just management, that pushed a release. Quite a few of the items wouldn't...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
July 1, 2019 at 2:03 pm
@itsrainman you've coded this:
WHERE
(i.[Despatch Date] IS NULL)
AND (i.[Cal Date] IS NULL)
AND (i.[Despatch to subcontractor] IS NOT NULL)
AND (i.[Return from Subcontractor] IS NOT NULL)...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 20, 2019 at 2:40 pm
Hi Mike
One of our solutions here uses a snapshot of a replicated database to replace a backup/restore process which used to take hours (about 12 of them). We don't talk...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 20, 2019 at 12:40 pm
Have you looked into database snapshots for this? It would save you a heck of a lot of coding.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 20, 2019 at 9:58 am
-- Work with what you can see.
-- Compare the columns from both sides, add to the matching columns list when you've figured out what's going on.
SELECT
T.[CustomerID],
T.[RelatedReferenceID],
T.[RelatedReferenceType],
T.[Due Date],
'#'...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 17, 2019 at 12:52 pm
I am going to develop a dashboard to monitor various stats about our Testing Environments. One piece of information I want to pull is the date that a refresh...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 14, 2019 at 3:27 pm
-- Use EOMONTH(H.startdate) instead of datename(MONTH,H.startdate), datepart(YEAR,H.startdate)
-- and remove h.Quantity from the GROUP BY
SELECT
RTRIM(COALESCE (E.PreferredName, E.FirstNames)) + ' ' + E.LastName AS [Name],
sum(H.Quantity) as [Hours],
datename(MONTH,x.YearMonth) as [month],
datepart(YEAR,x.YearMonth)...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 12, 2019 at 7:33 am
How nice it is to see this again - a bunch of folks working the hell out of a problem to come up with their solutions, each one faster and...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
June 3, 2019 at 1:09 pm
This looks about right, and if it is, then the start and end dates can be calculated.
;WITH SampleDates AS (
SELECT * FROM (VALUES
(GETDATE()+0),
('2019-01-26'),
('2019-01-27'),
('2019-01-28'),
('2019-01-29'),
('2019-01-30'),
('2019-01-31'),
('2019-02-01'),
('2019-02-23'),
('2019-02-24'),
('2019-02-25'),
('2019-02-26'),
('2019-03-23'),
('2019-03-24'),
('2019-03-25')
) d (thedate)
)
SELECT
thedate,
z.RealStartDate,
RealEndDate...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 31, 2019 at 12:38 pm
If you can batch up those inserts so that they are taking place under your control every 24 hours rather than at random every few minutes or so, your whole...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
May 24, 2019 at 3:04 pm
Viewing 15 posts - 76 through 90 (of 10,143 total)