Viewing 15 posts - 5,311 through 5,325 (of 5,678 total)
I'll second the request for this. The once in a blue moon I actually want this I'll turn it back off.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 11, 2010 at 5:38 pm
Eric, I believe you're on the right track regarding memory.
FOR XML by itself is not going to the problem, any more then any heavily used, large result set query would...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 11, 2010 at 11:34 am
KJ:
I see what you're trying to do here. You've got a starting sum (or a continuously added to sum) and then negatives in another structure you want both a...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 5:31 pm
craig-404139 (10/8/2010)
And one window with the gap range(s). Not sure why the the query to identify the gaps is stripping off the prefix and leading zeros. Ideal output would be:
Well,...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 4:53 pm
For the prepended PPCI parts, change the select into for #Contiguous to this:
SELECT
--Pattern,
--Series,
--MIN( StartNum) AS BeginSeries,
--Max( EndNum) AS EndSeries
Pattern + CAST( MIN( StartNum) AS VARCHAR(100)) AS BeginSeries,
Pattern + CAST(...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 4:26 pm
craig-404139 (10/8/2010)
I am getting weird results from the #contiguous table. It looks like:PPCI412903540
PPCI7102903235
PPCI1932903562
PPCI2122853875
PPCI1022903952
PPCI131402902866
PPCI8592903560
PPCI1452903559
PPCI5492903970
PPCI11452900794
PPCI632903558
PPCI12542903556
PPCI33962903208
PPCI902903539
That is seriously wierd. You are running the code end to end, right? Only change the...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 4:22 pm
This should do it:
DROP TABLE #gaps
DROP TABLE #Contiguous
DROP TABLE #MidPoint
CREATE TABLE #MidPoint
(RowID INT,
PrevRowID INT,
Pattern VARCHAR(100),
Startnum BIGINT,
EndNum BIGINT,
Series INT
)
INSERT INTO #Midpoint
( RowID, Pattern, StartNum, EndNum)
select
ROW_NUMBER() OVER (ORDER BY
left(controlnumber, PatIndex('%[0-9]%', controlnumber)-1),
convert(int,...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 4:02 pm
craig-404139 (10/8/2010)
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 3:42 pm
These are my results with the null rows removed:
Pattern GapStart GapEnd
-------- -------------------- --------------------
PPCI ...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 3:25 pm
This will sound strange but... are you sure you have gaps?
Run this code:
CREATE TABLE #MidPoint
(RowID INT,
Pattern VARCHAR(100),
Startnum BIGINT,
EndNum BIGINT
)
INSERT INTO #Midpoint
select
ROW_NUMBER() OVER (ORDER BY
left(controlnumber, PatIndex('%[0-9]%', controlnumber)-1),
convert(int, SubString(controlnumber, PatIndex('%[0-9]%', controlnumber),...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 3:04 pm
Found them, the sample rows:
2048205PPCI000737005NULL
2048206PPCI000737009NULL
2048207PPCI000999798NULL
2048208PPCI001346238NULL
2048209PPCI001350958NULL
2048210PPCI001462905NULL
2048211PPCI001620877NULL
2048212PPCI001620882NULL
2048213PPCI001620891NULL
2048214PPCI001620899NULL
2048215PPCI001620909NULL
2048216PPCI001620957NULL
2048217PPCI001620962NULL
They appear to be single page docs. Is this expected in the data?
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 2:50 pm
craig-404139 (10/8/2010)
CSV file attached.First column = id
Second column = controlnumber
Third column = endno
That worked. Alright, so we're looking at taking two unique values, figuring out the 'fill', and splitting...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 2:46 pm
Alvin Ramard (10/8/2010)
Brandie Tarvin (10/8/2010)
Ray K (10/8/2010)
Gianluca Sartori (10/8/2010)
At last, Mr. Celko gives a polite and useful answer to a poor-worded question.It's nice to see everyone can learn.
I don't know....
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 2:25 pm
I had assumed, since 2k5 and 2k don't behave, but figured it was worth the question. I'm sure Wayne and the others will be able to get you a...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 12:19 pm
craig-404139 (10/8/2010)
Updated the zip. Changed the compatibility to 90, added a pk column, and truncated the old large log (sorry i forgot the first time)
It would appear the internal version...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
October 8, 2010 at 12:03 pm
Viewing 15 posts - 5,311 through 5,325 (of 5,678 total)