Forum Replies Created

Viewing 15 posts - 16 through 30 (of 141 total)

  • RE: Setting up Custom Alert Based on SQL Server Log?

    Adiga (11/18/2010)


    The Error number will not be printed in SQL Server Error Logs. Please navigate to Application Event Log, you will find the error number listed there.

    Thanks for the direction.

  • RE: Setting up Custom Alert Based on SQL Server Log?

    Adiga (11/17/2010)


    You may create an Alert for Error # 833 and configure it to send an email to the operators. Here is an example

    USE [msdb]

    GO

    EXEC msdb.dbo.sp_add_alert @name=N'833Alert',

    @message_id=833,

    @severity=0,...

  • RE: Using a stored procedure to select columns?

    Paul White NZ (10/13/2010)


    craig-404139 (10/13/2010)


    Sorry didn't know you wanted to see the code. The problem I have is depending on the database the column 'controlnumber' can be called 'begno' or...

  • RE: Finding Sequences (Need help ASAP)

    I really appreciate the help everyone. I was able to figure out the code I need. Couldn't have done it without you guys.

    FYI this is my final working code...

  • RE: Using a stored procedure to select columns?

    Paul White NZ (10/13/2010)


    craig-404139 (10/13/2010)


    I have some code that finds sequences of numbers contained in 2 columns in a database. But these 2 columns can be named differently depending on...

  • RE: Using a stored procedure to select columns?

    Paul White NZ (10/13/2010)


    craig-404139 (10/12/2010)


    I have a large chunk of code that can be run on different columns. Is there any way to do something like this:

    select @col1,@col2

    from blahblah

    Using a...

  • RE: Finding Sequences (Need help ASAP)

    Craig Farrell (10/8/2010)


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

  • RE: Finding Sequences (Need help ASAP)

    Same weird results. Ideally it would return one window with the ranges of sequential numbers:

    PPCI000000001 - PPCI000737004

    PPCI000737006 - PPCI000737008

    PPCI000737010 - PPCI000999797

    PPCI000999799 - PPCI001346237

    PPCI001346239 - PPCI001350957

    PPCI001350959 - PPCI001462904

    PPCI001462906 - PPCI001620876

    PPCI001620878 -...

  • RE: Finding Sequences (Need help ASAP)

    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

  • RE: Finding Sequences (Need help ASAP)

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

  • RE: Finding Sequences (Need help ASAP)

    Craig Farrell (10/8/2010)


    These are my results with the null rows removed:

    Pattern GapStart GapEnd

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

    PPCI ...

  • RE: Finding Sequences (Need help ASAP)

    Did you delete the 'null' endno rows? If so I ran your code against mine and it didnt find any. try running my code against yours and see what happens?...

  • RE: Finding Sequences (Need help ASAP)

    I think i'm on to something. The below code works if I strip out the PPCI prefix. (Used a update/replace statement on the test table) Runs in a few seconds....

  • RE: Finding Sequences (Need help ASAP)

    Craig Farrell (10/8/2010)


    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?

    Technically yes. But you can discard those rows or update the...

  • RE: Finding Sequences (Need help ASAP)

    Craig Farrell (10/8/2010)


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

Viewing 15 posts - 16 through 30 (of 141 total)