November 7, 2013 at 11:34 am
Hello Everyone
I have one task in there, i need to remover overlapping by date
see below
CREATE TABLE #X1
(
StudentID VARCHAR(10),
EntryDate INT,
Withdrawdate INT,
)
INSERT INTO #X1 VALUES ('003844536',20010904,20050616)
INSERT INTO #X1 VALUES ('003844536',20060831,20080615)
INSERT INTO #X1 VALUES ('003844536',20070918,20991231)
INSERT INTO #X1 VALUES ('003844536',20070918,20991231)
INSERT INTO #X1 VALUES ('003844536',20080828,20100616)
INSERT INTO #X1 VALUES ('003844536',20100902,20130503)
Desire output
StudentIDEntryDateWithdrawdate
0038445362001090420050616
0038445362006083120080615
0038445362007091820991231
Please help me do this
November 7, 2013 at 2:43 pm
Please define "overlapping".
Two rows are identical: is this overlapping in your definition?
The last row you insert in not in the desired output: why?
-- Gianluca Sartori
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply