Viewing 15 posts - 1,741 through 1,755 (of 10,143 total)
hoseam (2/17/2016)
I'm struggling to write a code to get five previous working days. I'm trying to get 'Today', 'Yesterday', 'A day before Yesterday', '3 days prior Today' and '4 days...
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
February 17, 2016 at 3:32 am
The dual-rownumber method is also promising:
DROP TABLE #Sample
CREATE TABLE #Sample (pkLocalPatientLocalID VARCHAR(2),pkSpellLocalID VARCHAR(3),WardLocation VARCHAR(20),WardSequence INT,RoomName VARCHAR(20),Bed INT,BedSequence INT,StartDateTime DATETIME,FinishDateTime DATETIME,[WardSequence Required] INT)
INSERT INTO #Sample
(pkLocalPatientLocalID,pkSpellLocalID,WardLocation, WardSequence,RoomName, Bed, BedSequence, StartDateTime, FinishDateTime,...
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
February 16, 2016 at 10:09 am
SQLRNNR (2/16/2016)
jasona.work (2/16/2016)
GilaMonster (2/16/2016)
Cthulhu for president! Why vote for the lesser evil?
I'm leaning towards the Palpatine / Vader ticket myself...
Or if they don't make it, Bill and Opus...
(I refuse to...
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
February 16, 2016 at 10:08 am
Lynn Pettis (2/16/2016)
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
February 16, 2016 at 9:02 am
GilaMonster (2/16/2016)
Cthulhu for president! Why vote for the lesser evil?
Cthulhu's already president - of the "other" united states.
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
February 16, 2016 at 7:59 am
-- the DISTINCT appears to be redundant, there were the same number of rows either side of the distinct sort operator.
SELECT
o.sys_key, -- "o" is the alias for table...
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
February 16, 2016 at 7:02 am
nadersam (2/16/2016)
This is a big table and accessed by most functions in system.
Is there anyway to reduce the count...
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
February 16, 2016 at 5:56 am
Orlando Colamatteo (2/15/2016)
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
February 16, 2016 at 4:42 am
Jeff Moden (2/15/2016)
TomThomson (2/15/2016)
Jeff Moden (2/15/2016)
Sean Lange (2/15/2016)
Grant Fritchey (2/15/2016)
Hugo Kornelis (2/15/2016)
jasona.work (2/15/2016)
How do you feel if someone comes back and tells you that they tested...
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
February 16, 2016 at 1:28 am
jasona.work (2/15/2016)
How do you feel if someone comes back and tells you that they tested a solution you provided before they told their bosses it was...
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
February 15, 2016 at 7:45 am
SQL!$@w$0ME (2/12/2016)
Thanks, Please see the actual plan attached.
1. Can you amend the index as suggested earlier?
2. Can you run it with sensible parameters such that it returns a result set?
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
February 12, 2016 at 7:25 am
SQL!$@w$0ME (2/12/2016)
Tks. I've attached the sqlplan.
Add ActivityDescription as an INCLUDE column to index [IX_Activity_ActivityCodeId_DeletedAt_CaseId_ActivityDate], it's currently showing as 78% of the total cost of the query and masking everything else....
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
February 12, 2016 at 7:12 am
SQL!$@w$0ME (2/12/2016)
Tks. I've attached the sqlplan.
That's the estimated plan. Can you post the actual plan please?
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
February 12, 2016 at 6:41 am
SQL!$@w$0ME (2/12/2016)
-- Stored Procedure
CREATE procedure [dbo].[PeerReviewsGet]
as
begin
select Review_tab.ReviewId CustomerReferralId,
Review_tab.ActivityId ReviewActivityId,
ImeEventDetail.Id ImeEventDetailId,
activity.Id ActivityId,
caseinfo.casenum as CaseNumber,
convert(varchar, ImeEventDetail.ImeEventId) + ImeEventDetail.Extension...
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
February 12, 2016 at 5:47 am
Here's a live topic on the subject.
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
February 11, 2016 at 9:11 am
Viewing 15 posts - 1,741 through 1,755 (of 10,143 total)