Viewing 15 posts - 1,846 through 1,860 (of 10,144 total)
There are some code gotcha's in your original query. Looking at the first CTE, and expanding the range of PartID to get a decent sample set for testing, shouldn't this:
SELECT...
January 7, 2016 at 9:05 am
Phantom forum post!
Go to this thread
Click on the Quote button
Scroll down to view earlier posts (click on the [+] icon if necessary)
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...
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
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...
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...
January 5, 2016 at 8:43 am
rs80 (12/23/2015)
December 23, 2015 at 8:19 am
Brandie Tarvin (12/23/2015)
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...
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...
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
>>>>>------------------->
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...
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...
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...
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,...
December 17, 2015 at 4:05 am
Viewing 15 posts - 1,846 through 1,860 (of 10,144 total)