Forum Replies Created

Viewing 15 posts - 1,126 through 1,140 (of 1,315 total)

  • RE: Log ship issue. Restored database and it''''s still loading....

    If you want to use the log-shipped database as read-only, you need to use the STANDBY=<file> option in your RESTORE statements (in place of NORECOVERY).  This allows it to recover...

  • RE: Use sp_addlogin to syncronize users

    There is no hitch, that will work perfectly.  (Assuming a login of the same name doesn't already exist.)  Creating them correctly in the first place is so much easier than...

  • RE: Automatic Backup Script

    I take a different approach to automating maintenance plans.  I create several maintenance plans that do only one thing (Full Backup, Log Backup, and ReIndex).  I then schedule a job...

  • RE: Converting data Types with Active X transformation

    Are these null values, or illegal characters?

    You can try to check the values with IsDate and IsNumeric before doing CInt or CDate.

    Function Main()

    Dim strSessionID

    strSessionID = DTSSource("Col002")

    If IsNumeric(strSessionID) Then

      ...

  • RE: Questions about some error handing code?

    When an identity field is incremented by INSERT, it stays incremented even if the INSERT is rolled back.  From BOL under @@IDENTITY: "The @@IDENTITY value does not revert to a previous...

  • RE: Select Statement Vs Loop

    Maybe I need to use more smileys.

  • RE: Select Statement Vs Loop

    Yes, I meant both of you, but it was not supposed to be a flame.  Sometimes I come off as more serious than I intend.

    The original question was why are...

  • RE: Questions about some error handing code?

    I know that's true of @@ERROR but I haven't seen it with @@IDENTITY.  You're probably correct, but the only way I know of to screw up @@IDENTITY is to have...

  • RE: Select Statement Vs Loop

    The guy asked why a cursor is slower and deserved some facts, not to be told "your understanding is not correct" or "your understanding is wrong".

    I may be a cardinal...

  • RE: Updating multiple rows with different values

    I have one guy who can't remember that when you cut-and-paste from Excel into an EM grid you get a trailing carriage return.  So I had to add this check...

  • RE: query over two databases

    There's no special name for that kind of query, but using multi-part object names is called a qualified reference.  For example, see "Qualifying Names Inside Stored Procedures" in BOL.

  • RE: Questions about some error handing code?

    One huge problem is at the end of the error checks:

        ELSE

      PRINT 'An error has occurred and/or a transaction needs to be rolled back'

           ROLLBACK TRANSACTION

    The ELSE only applies to the...

  • RE: Select Statement Vs Loop

    I tried to list some of the obvious reasons why looping through a cursor will be slower than a SELECT, but I forgot to warn you that you risk running...

  • RE: Select Statement Vs Loop

    SELECT can perform some operations on parallel threads, a cursor forces operations to be serialized on one thread.

    Cursors consume extra resources on the server and require more overhead.  Creating a...

  • RE: combining two queries with different columns

    If the two tables contain different sets of rows, you might want to do a FULL JOIN to get all rows instead of an INNER JOIN.  And you can combine...

Viewing 15 posts - 1,126 through 1,140 (of 1,315 total)