Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)

  • RE: Backup job fails but maintenance plan succeeds

    This is happening to me as well. Backups complete fine but the job reported failure via email. LOGs show the backups and cleanups working as expected. Also started happening...

  • RE: Add Line number in a Select result

    Sorry, I didn't even look at the section this was posted under.

    The SQL2005 functionality would be the best way to go.

  • RE: Add Line number in a Select result

    The temp table numbering is not affected by deletions in the source table.

    If you need to "delete" rows from the output this could be done in the where clause of the insert...

  • RE: Add Line number in a Select result

    Try this

     

    CREATE table #NumberName(LineNumber int not null identity(1,1),firstname varchar(25),surname varchar(50))

     

    insert into #NumberName(firstname,surname)

    select firstname,surname

    from tbl_employees

    order by surname,firstname

     

    select LineNumber,firstname,surname

    from #NumberName

    order by LineNumber

  • RE: corrupt mdf and ldf file

    I've successfully used this script when our log drive died, taking all the .ldfs with it.

    (You might like to try testing this on another machine first.)

    --LISTING 1: Undocumented DBCC Command...

  • RE: Jobs - embed TSQL or Call Stored Procedure??

    fhanlon: Using @@error to detect the error is fine but it doesn't prevent the error condition being raised and detected by the Job/Server Agent.  I haven't tried the obvious of...

  • RE: Jobs - embed TSQL or Call Stored Procedure??

    I have a similar problem.  I have a stored proc that I want to run from a job but part of the stored proc may generate and "handle" an unique...

  • RE: Find Min/Max Values in a Set

    I got a result very similar to yours:

    select count(*) as rank, max(s1.number) as number

    from(

    select number from NMaxMin group by number

    ) as s1

    inner join

    (

    select number from NMaxMin group by number

    )...

Viewing 8 posts - 1 through 8 (of 8 total)