Viewing 15 posts - 3,196 through 3,210 (of 10,143 total)
Koen Verbeeck (7/2/2014)
Jo Pattyn (7/1/2014)
Funny! :w00t:Anyway the Belgium Red Devils got past the USA soccer team after a thrilling match.
It was an awesome game.
The US team (actually just the goalkeeper...
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 2, 2014 at 7:26 am
Dohsan (7/2/2014)
ChrisM@Work (7/2/2014)
SELECT PersonID, StartMonth = MIN(MONTHID), EndMonth = MAX(MONTHID), LOADPCT = PercentLoad
FROM (
SELECT *,
[Grouper] = MONTHID - ROW_NUMBER() OVER(PARTITION BY PersonID, PercentLoad ORDER BY MONTHID)
...
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 2, 2014 at 7:16 am
Try this:
SELECT PersonID, StartMonth = MIN(MONTHID), EndMonth = MAX(MONTHID), LOADPCT = PercentLoad
FROM (
SELECT *,
[Grouper] = MONTHID - ROW_NUMBER() OVER(PARTITION BY PersonID, PercentLoad ORDER BY MONTHID)
FROM #TestProject2...
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 2, 2014 at 7:09 am
pwalter83 (7/2/2014)
ChrisM@Work (7/2/2014)
pwalter83 (7/2/2014)
... it does not calculate the ratio for the first row...
If your calculation depends upon a value from a previous row, what should the result of the...
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 2, 2014 at 4:46 am
pwalter83 (7/2/2014)
... it does not calculate the ratio for the first row...
If your calculation depends upon a value from a previous row, what should the result of the calculation be...
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 2, 2014 at 3:42 am
Your query has four output columns:
SELECT
ot.OperationalTypeAlternateKey AS [OperationalTypeAlternateKey]
,ot.OperationalType AS [Entry Type]
,Convert(Varchar, DateDayOfMonth)+' '+DateMonthName + ' '+ Convert(Varchar,DateYear) AS [Date]
,COUNT(*) AS [Total]
FROM
If you're returning a single row...
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 25, 2014 at 5:38 am
djj (6/25/2014)
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 25, 2014 at 5:18 am
The issue is a lack of clarity.
Don't give up. Have a look at the result of this:
IF OBJECT_ID ('tempdb..#GLT') IS NOT NULL DROP TABLE #GLT
CREATE TABLE #GLT (
[Sequence] [int] NULL,
[WK...
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 25, 2014 at 3:56 am
pwalter83 (6/25/2014)
ChrisM@Work (6/25/2014)
pwalter83 (6/25/2014)
ChrisM@Work (6/25/2014)
pwalter83 (6/24/2014)
ChrisM@Work (6/24/2014)
pwalter83 (6/24/2014)
Jeff Moden (6/24/2014)
pwalter83 (6/24/2014)
ChrisM@Work (6/24/2014)
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 25, 2014 at 3:40 am
pwalter83 (6/25/2014)
ChrisM@Work (6/25/2014)
pwalter83 (6/24/2014)
ChrisM@Work (6/24/2014)
pwalter83 (6/24/2014)
Jeff Moden (6/24/2014)
pwalter83 (6/24/2014)
ChrisM@Work (6/24/2014)
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 25, 2014 at 2:57 am
pwalter83 (6/24/2014)
ChrisM@Work (6/24/2014)
pwalter83 (6/24/2014)
Jeff Moden (6/24/2014)
pwalter83 (6/24/2014)
ChrisM@Work (6/24/2014)
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 25, 2014 at 1:52 am
pwalter83 (6/24/2014)
Jeff Moden (6/24/2014)
pwalter83 (6/24/2014)
ChrisM@Work (6/24/2014)
IF OBJECT_ID...
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 24, 2014 at 9:26 am
Rog Saber (6/23/2014)
I want to find the earliest time_sched_start_dt, time_sched_end_dt where col_val is null
and the datediff between time_sched_start_dt 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 24, 2014 at 8:54 am
Change
HAVING DATEDIFF(MINUTE,MAX(CASE WHEN dir = 'S' THEN dt END),MAX(CASE WHEN dir = 'E' THEN dt END)) > @duration
to
HAVING DATEDIFF(MINUTE,MAX(CASE WHEN dir = 'S' THEN dt END),MAX(CASE WHEN dir...
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 24, 2014 at 7:50 am
Rog Saber (6/24/2014)
time_sched_start_dtenddt
2014-06-23 09:15:00.0002014-06-23 11:30:00.000
I don't want...
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 24, 2014 at 7:45 am
Viewing 15 posts - 3,196 through 3,210 (of 10,143 total)