Viewing 15 posts - 1,846 through 1,860 (of 10,143 total)
Phantom forum post!
Go to this thread
Click on the Quote button
Scroll down to view earlier posts (click on the [+] icon if necessary)
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
January 7, 2016 at 6:16 am
sqlbidev (7/7/2015)
I have a populated table on my local machine, I have created the linked server and connection is working fine.
I have also created the same table on redshift...
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
January 7, 2016 at 6:13 am
Grumpy DBA (1/7/2016)
Ed Wagner (1/7/2016)
Stuart Davies (1/7/2016)
Belated?Late
Pregnant
paws
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
January 7, 2016 at 5:55 am
Eirikur Eiriksson (1/5/2016)
For a laugh, I'm just going to post a query I wrote yesterday based on some work I did years ago
Very fast code! It wouldn't take much tweaking...
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
January 6, 2016 at 4:20 am
Hi Alan, nice job 🙂
Here's a completely different take on the problem, loosely based on some fuzzy matching stuff I've worked on over the years. It looks promising and you...
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
January 5, 2016 at 8:43 am
rs80 (12/23/2015)
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
December 23, 2015 at 8:19 am
Brandie Tarvin (12/23/2015)
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
December 23, 2015 at 6:49 am
chris92mars (12/22/2015)
The Errror is Column Name or number of supplied values does not match the 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
December 23, 2015 at 3:05 am
Brandie Tarvin (12/22/2015)
Cancer cat (Formerly had a sarcoma removed) now needs to go back in for some surgical...
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
December 23, 2015 at 1:20 am
Phil Parkin (12/22/2015)
It seems that everyone in this thread spends their spare time shooting things :exclamationmark::-D
Usually, yes
>>>>>------------------->
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
December 23, 2015 at 1:18 am
Something along these lines should do the trick, however I'd recommend you don't do it. If the number you are storing with the date of the visit is of any...
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
December 22, 2015 at 3:06 am
This should get you started:
SELECT *
FROM workorders i
CROSS APPLY (
SELECT *
FROM workorders tc
WHERE tc.JobType = 'TC'
AND tc.AccountNumber = i.AccountNumber
AND tc.ScheduledDate BETWEEN i.ScheduledDate AND DATEADD(DAY,30,i.ScheduledDate)
) x
WHERE i.JobType...
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
December 17, 2015 at 9:50 am
Tallboy (12/17/2015)
Wow, thank you so much... looks the business!
I had been reading about the Tally Tables but can't claim to understand it!
I copied and pasted you code into...
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
December 17, 2015 at 5:08 am
-- make up some sample data to work with
DROP TABLE #Sample;CREATE TABLE #Sample (NStartDate DATE, ApptTime TIME, Duration SMALLINT, Frequency SMALLINT, ClientID INT, NEndDate DATE)
INSERT INTO #Sample (NStartDate, ApptTime, Duration,...
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
December 17, 2015 at 4:05 am
CONCAT is designed for stuff on the same row. For concatenating stuff from different rows you need an alternative approach, most of which are covered in Aaron Bertrand's article here.
Try...
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
December 17, 2015 at 3:26 am
Viewing 15 posts - 1,846 through 1,860 (of 10,143 total)