Forum Replies Created

Viewing 15 posts - 5,311 through 5,325 (of 5,678 total)

  • RE: Provide account setting to disable forum email subscriptions

    I'll second the request for this. The once in a blue moon I actually want this I'll turn it back off.


    - Craig Farrell

    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

  • RE: Performance Degradation

    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...


    - Craig Farrell

    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

  • RE: Running Totals within a calculation

    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...


    - Craig Farrell

    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

  • RE: Finding Sequences (Need help ASAP)

    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,...


    - Craig Farrell

    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

  • RE: Finding Sequences (Need help ASAP)

    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(...


    - Craig Farrell

    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

  • RE: Finding Sequences (Need help ASAP)

    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...


    - Craig Farrell

    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

  • RE: Finding Sequences (Need help ASAP)

    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,...


    - Craig Farrell

    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

  • RE: Finding Sequences (Need help ASAP)

    craig-404139 (10/8/2010)


    Craig if you were local i'd buy you a beer. We killed 2 birds with one stone. I needed to identify the ranges of sequential numbers (my code) and...


    - Craig Farrell

    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

  • RE: Finding Sequences (Need help ASAP)

    These are my results with the null rows removed:

    Pattern GapStart GapEnd

    -------- -------------------- --------------------

    PPCI ...


    - Craig Farrell

    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

  • RE: Finding Sequences (Need help ASAP)

    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),...


    - Craig Farrell

    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

  • RE: Finding Sequences (Need help ASAP)

    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?


    - Craig Farrell

    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

  • RE: Finding Sequences (Need help ASAP)

    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...


    - Craig Farrell

    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

  • RE: Are the posted questions getting worse?

    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....


    - Craig Farrell

    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

  • RE: Finding Sequences (Need help ASAP)

    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...


    - Craig Farrell

    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

  • RE: Finding Sequences (Need help ASAP)

    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)

    http://www.sqlservercentral.com/Forums/FindPost1001360.aspx

    It would appear the internal version...


    - Craig Farrell

    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

Viewing 15 posts - 5,311 through 5,325 (of 5,678 total)