Forum Replies Created

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

  • RE: deadlocks

    Definately an issue. None of the data was cache'd in memory yet, the server was busy using the disks, and your CPU was probably spiked to 100%.

    I wouldn't worry...

  • RE: optimising makes it 10 times worse?

    I saw it once in a blue moon on an equivalent system. Vendor built, horrendous structure, etc.

    What we eventually puzzled out (without proof, might I add, this...

  • RE: Are There That Many GUIDs?

    e3h4 (10/12/2010)


    People often assume you need to use GUIDs for unique values across databases and for replication. However, there is an easy way to get around that using an...

  • RE: Need Records other than month end dates from a table

    Mod this a little and it should get you where you're going. The trick is using the date manipulation functions and the datediff thresholds.

    CREATE TABLE #tmp

    ( LockEndDate DATETIME)

    INSERT INTO...

  • RE: Subquery returned more than 1 value.

    This is going to sound mean, but we can't help you with this one without having a copy of the database.

    The error says exactly what it means, one of the...

  • RE: deadlocks

    I've found that 90% of the time a spid 'blocks itself'... it's waiting on Disk IO, which is what PAGEIOLOCK means.

    Tell them the disks are slow, and take a look...

  • RE: Datetime conversion

    Well, for starters, it's going to want a year.

    I don't have 2k8 handy to run a direct test for datetime2, but stripping off the 'day of week' at the beginning...

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

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

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

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

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

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

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

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

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