Viewing 15 posts - 1,426 through 1,440 (of 10,143 total)
dandrews 45259 (7/4/2016)
I hoping somebody can help with a sql issue I have. WE have sales orders and works orders. I am looking at the works order history...
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 4, 2016 at 5:01 am
SELECT
MinNum = @MinNum + (n * @Span),
MaxNum = @MinNum + ((n+1) * @Span)
FROM (VALUES (0),(1),(2),(3),(4),(5),(6)) d (n)
WHERE n < @Interval
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 4, 2016 at 3:13 am
gkrs (7/1/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
July 1, 2016 at 9:10 am
In case that was missed in translation (!), here it is again:
DECLARE @database2 NVARCHAR(100);
DECLARE @DBs TABLE (DBname NVARCHAR(100));
INSERT INTO @DBs VALUES ('?'),('?'),('?');
SELECT * FROM @DBs
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, 2016 at 8:47 am
BWFC (7/1/2016)
gkrs (7/1/2016)
I usually...
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, 2016 at 6:51 am
Newbi (7/1/2016)
HiI am getting error when trying to run your script.
Help pls.
...
Why are you attempting to include the sample data setup in your report definition? It's only in...
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, 2016 at 2:54 am
J Livingston SQL (6/30/2016)
oops...wrong post !apologies
You have a spare turtle?
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 30, 2016 at 10:05 am
Beatrix Kiddo (6/30/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
June 30, 2016 at 9:53 am
Here's some stuff for you to explore. Your query can be simplified a lot and made much faster...
IF 0 = 1
WITH MyDates AS (
SELECT * FROM (VALUES
('1500', '20160423'),('0020',...
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 30, 2016 at 9:15 am
Can you provide a few examples of *exactly* what they look like?
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 30, 2016 at 8:21 am
lcaradon (5/10/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
June 30, 2016 at 8:19 am
When you say it's slower, is it 4s vs 2s or 104s vs 102s?
This is more important: what datatype are q2.DateofOnsetofLabour and q2.TimeofOnsetofLabour?
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 30, 2016 at 8:07 am
richardmgreen1 (6/30/2016)
I've had a look at the updated Splitter code and it actually runs a few seconds slower than my original.
Not entirely sure why as I would have thought...
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 30, 2016 at 7:59 am
Two changes worth trying. Firstly, introducing the splitter:
OUTER APPLY (
SELECT MedicalInduction = ds.Item
FROM [MeditechDR01-M1].[livefocdb_daily].[dbo].[RegAcctQuery_Result] aq1
CROSS APPLY DelimitedSplit8K (replace(replace(aq1.[ValueInfo],'}',''),'{',''),'|') ds
WHERE aq1.[Query_MisQryID] IN ('MAT.MEDIND')
AND aq1.SourceID = ad.SourceID
AND aq1.VisitID = ad.VisitID
) q3
Secondly, 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
June 30, 2016 at 6:40 am
richardmgreen1 (6/30/2016)
Thanks ChrisI've now got it running as expected.
Cool, well done.
There are issues with the fragment of query you posted - do you want help with resolving them?
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
June 30, 2016 at 5:32 am
Viewing 15 posts - 1,426 through 1,440 (of 10,143 total)