Viewing 15 posts - 7,516 through 7,530 (of 10,143 total)
crookj (8/12/2010)
WOTD - Octopus(The sour gummie type - my granddaughter's favorite candy)
Joe
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
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...
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
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.
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
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...
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
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...
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
August 12, 2010 at 5:32 am
Where does the end-date come from, for rowid 3?
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
August 12, 2010 at 5:20 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...
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
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...
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
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...
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
August 12, 2010 at 4:43 am
khushbu (8/12/2010)
I know NULL...
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
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...
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
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...
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
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...
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
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?
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
August 12, 2010 at 2:46 am
It's not rocket science, converting a query into a stored procedure or vice versa. So why not let us assume that you are writing a stored procedure? Then if 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
August 11, 2010 at 9:16 am
Viewing 15 posts - 7,516 through 7,530 (of 10,143 total)