Forum Replies Created

Viewing 15 posts - 661 through 675 (of 683 total)

  • RE: Where clause depending of parameter

    Vladan's example is probably going to be the best example, if you want to keep everything in one single SQL statement.

    In general you want to avoid using functions in WHERE...

  • RE: Controlling Unusually Long Running Jobs

    Yeah, I'm not sure what the problem is really.  There is a run_status field in sysjobhistory but it doesn't get populated until the job finishes, which defeats the purpose of...

  • RE: Controlling Unusually Long Running Jobs

    Leo,

    good article.  However, there is an issue with your use of the sysjobhistory table.  You mention, near the end of your article, that if we want to check on jobs...

  • RE: Restore works from QA, but not EM

    I've seen this error before and although it could be various things in my case it was always that SQL Server was not listening on shared memory.  The fact that...

  • RE: Duplicate Records inserted in a table

    If I have understood your problem correctly, what you need to do is to encapsulate all three of your steps into a single transaction and ensure that you lock the...

  • RE: Yet another xp_cmdshell question...

    If you can't find anything on http://www.sqldts.com try this....  Schedule the DTS package so that it creates a SQL job for you and then make sure that you disable...

  • RE: Table Locking

    Looks like that would work, although I'd rather use a TABLOCKX to be certain.  I'd also write it out slightly differently.

    BEGIN TRAN

    DECLARE @NextReference int

    --taking out the exclusive lock here ensures...

  • RE: error-handling inside a UDF

    quote:


    Declare @ReturnDate Datetime

    Select @ReturnDate = fn_SomeFunc(@SomeArg)

    If (@ReturnDate = '1 Jan 1900')

    -- Error Returned, Rollback etc.

    Else

    -- Commit Transaction


  • RE: error-handling inside a UDF

    Beats me,

    I know that I can use the return statement. The problem is that in this particular function I'm returning a datetime, which limits what I can return. ...

  • RE: error-handling inside a UDF

    Beats me,

    I know that I can use the return statement. The problem is that in this particular function I'm returning a datetime, which limits what I can return. ...

  • RE: Using OPENROWSET and trapping errors

    Thanks for your reply.

    Unfortunately I'm not going to be able use your solution. This is because the number of servers I'm connecting to is dynamic so I would not...

  • RE: selecting distinct Records

    It is possible. Not very practical but possible.

    One thing that might make it more impractical is the number of repeats. Ideally, it would be good if you know...

  • RE: ASP forms & SQL syntax error

    Another thing you can do if you want to preserve the apostrophe is using the replace function in the same way that was described but this time replace the single...

  • RE: View Jobs without SysAdmin Privilege

    There is a built in role in the msdb database called TargetServersRole that allows any users within the role to execute sql server jobs.

    I'm not sure whether it allows users...

  • RE: obtaining list of NT Groups for given NT user name

    Andy,

    thanks for the reply. Regarding the NetGroupGetMembers thingy, I managed to find another one that almost gives me what I want. It's called NetUserGetGroups and is used in...

Viewing 15 posts - 661 through 675 (of 683 total)