Viewing 15 posts - 766 through 780 (of 1,246 total)
Seriously? The new forum format is going to replace ending parens with smirky faces???
January 17, 2017 at 11:14 am
Something a little more along these lines...
CREATE TABLE dbo.Player (
PlayerID INT NOT NULL,
FirstName VARCHAR(20) NOT NULL,
LastName VARCHAR(20) NOT NULL
CONSTRAINT pk_Player PRIMARY KEY CLUSTERED (PlayerID)
);
CREATE TABLE dbo.Sport (
SportID INT NOT NULL,
SportName...
January 5, 2017 at 12:45 pm
ben.brugman (1/5/2017)
At home I only have access to a 2008R2 version of SQL-server. With the supplied code the message :...
January 5, 2017 at 8:44 am
Joe - Welcome to SSCI don't wan't to shatter your vision but both designs are pretty horrible and both violate the 1st normal form... The one you're trying to get...
January 3, 2017 at 10:34 am
Jeff Moden (12/23/2016)
Jason A. Long (12/23/2016)
December 27, 2016 at 8:34 am
@jeff - It looks to be the result of some sort of matching process, where A was matched to B and B was matched to A... Resulting in 50% redundant...
December 23, 2016 at 3:29 pm
The code works of a simple idea...
If you order the rows by start date, the end of early rows controls the begin dates of all subsequent rows.
If the end date...
December 23, 2016 at 12:59 pm
ben.brugman (12/23/2016)
Jason A. Long (12/22/2016)
Here's what the solution looks like laid out graphically in Excel (note: I change a few dates to compact the ranges...)
Exactly what was asked, thank you.
I...
December 23, 2016 at 12:36 pm
Here's what the solution looks like laid out graphically in Excel (note: I change a few dates to compact the ranges...)
December 22, 2016 at 4:06 pm
This should be a simpler & faster solution as it only takes a single pass over the data...
-- Setup some test data...
IF OBJECT_ID('tempdb..#TestData', 'U') IS NOT NULL
DROP TABLE #TestData;
CREATE...
December 22, 2016 at 1:25 pm
Jeff Moden (12/21/2016)
Yes. The old article is what I was talking about. Hadn't seen the new one. Unfortunately, I'm like a lot of humans in that...
December 21, 2016 at 11:18 am
Jeff Moden (2/11/2016)
Itzik Ben-Gan wrote about this quite a while back but he took the post down and haven't seen it reposted. Might be around somewhere.
Is this the article...
December 20, 2016 at 6:14 pm
drew.allen (12/20/2016)
December 20, 2016 at 4:24 pm
This is based on an old(ish) Itzik Ben-Gan solution... The Last non NULL Puzzle
IF OBJECT_ID('tempdb..#Data', 'U') IS NOT NULL
DROP TABLE #Data;
CREATE TABLE #Data (
ID VARCHAR(20),
SEQ INT,
Date DATETIME,
Action VARCHAR(20)
);
INSERT INTO...
December 20, 2016 at 2:57 pm
You've got a much better chance of getting an answer if you were to post consumable data.
Please read Forum Etiquette: How to post data/code on a forum to get the...
December 20, 2016 at 1:42 pm
Viewing 15 posts - 766 through 780 (of 1,246 total)