Viewing 15 posts - 7,516 through 7,530 (of 10,144 total)
Can you post the whole procedure?
August 13, 2010 at 4:54 am
crookj (8/12/2010)
WOTD - Octopus(The sour gummie type - my granddaughter's favorite candy)
Joe
August 12, 2010 at 10:04 am
Dewes van Lohuizen (8/12/2010)
Brandie is right: Holland is a province in the Netherlands, we have North Holland and South Holland.
People often says Holland and mean The Netherlands.
And football: Spain was...
August 12, 2010 at 7:52 am
;WITH OrderedRows AS (
SELECT RowNo = ROW_NUMBER() OVER (PARTITION BY acolumnlist ORDER BY acolumnlist)
FROM MyTableWithDupes
)
DELETE FROM OrderedRows WHERE RowNo > 1
Edited to show that the script includes DELETE.
August 12, 2010 at 7:06 am
dbowlin (8/12/2010)
Vacation......A lot of people must be on vacation because the post frequency to this forum has dropped dramatically.
I wish I was on vacation too.
🙂
Me too.
Getting tired now after...
August 12, 2010 at 6:56 am
khushbu (8/12/2010)
Thanks a TON!!!!The query works very well.
the enddate for rowid = 3 comes form startdate-1 from row id = 4.....
and for last row id there is default value.
You're...
August 12, 2010 at 5:32 am
khushbu (8/12/2010)
Rowid deccode tarief Startdate Enddate
1 010127 4300 2005-01-01 2005-12-31
2 010127 4300 2006-01-01 2007-12-31
3 010128 4300 2008-01-01 2004-12-31
4 010229 4300 2005-01-01 2005-12-31
5 010230 4300 2006-01-01 2099-01-01...
August 12, 2010 at 5:19 am
khushbu (8/12/2010)
But may be I did not get the partition part .
No, a startdate from one deccode cannot be used as the enddate for another.
The end...
August 12, 2010 at 5:04 am
khushbu (8/12/2010)
the data is partitioned on deccode, tarief and startdate
That's a description of a row, not a partition, which is a group of rows with a common value in one...
August 12, 2010 at 4:43 am
khushbu (8/12/2010)
I know NULL...
August 12, 2010 at 4:31 am
khushbu (8/12/2010)
The enddate for rowid = 1 should be 2005-12-31 while it gives 2004-12-31.
The query seems to be substracting 1 from the...
August 12, 2010 at 3:27 am
Dennis, I'm not sure if this will work because there's nothing to test against, but give it a try. Even if it doesn't, it should give you a few ideas:
SELECT...
August 12, 2010 at 3:21 am
If RowID has no gaps and can be reliably used to identify "the other row", then something like this should work for you:
CREATE TABLE #MyTable (
Rowid INT,
deccode CHAR(6),
tarief...
August 12, 2010 at 2:56 am
How do you know which row the enddate should be derived from?
Are there gaps in the sequence suggested by column RowID?
August 12, 2010 at 2:46 am
Viewing 15 posts - 7,516 through 7,530 (of 10,144 total)