Forum Replies Created

Viewing 15 posts - 61 through 75 (of 100 total)

  • RE: Row locking and Table locking

    SqlGuru... who, me? I was just illustrating the approach (I didn't declare/init @whatever, either). And yeah, use error trapping. I've used similar code in the past and it didn't appear...


    Cursors are useful if you don't know SQL

  • RE: Row locking and Table locking

    To gregory.anderson-- this is a dumb question, but no cursors are involved anywhere in this process, right? You said

    ...first, gathers statistics based on the type of requests that come through...


    Cursors are useful if you don't know SQL

  • RE: Drive Letter Finder

    I think this'll give you the same result with a lot less work:

    declare @foo table (drive char(1),mbfree int)

    INSERT INTO @foo EXEC master..xp_fixeddrives

    IF @@rowcount = 26

    SELECT '*' as drive

    ELSE

    SELECT TOP...


    Cursors are useful if you don't know SQL

  • RE: Significance of using dbo in create statement

    I was seeing objects in a db that were in user schemas and it took a bit to figure out why. It happened when they were not explicitly using "dbo"...


    Cursors are useful if you don't know SQL

  • RE: Date Range Parameters (between)

    Jack Corbett (10/7/2009)


    Jeff Moden (10/7/2009)


    Excellent tip/reminder on the "next day" thing, Jack.

    Thanks. I used to be a BETWEEN guy, but about a year ago I had a discussion here...


    Cursors are useful if you don't know SQL

  • RE: Table is locked but can't find SPID to kill

    I thought the OP was trying to resolve a spid = -1; I poked around online and the only references to -1 spid were dealing with SQL 6.5(!)

    As far as...


    Cursors are useful if you don't know SQL

  • RE: unable to modify "subject line" of the sql server 2005 email notification

    This repeats tracy's post a bit, but what the heck.

    Both of these require Database Mail. You send the email to a defined SQL Operator; An operator CAN be a domain...


    Cursors are useful if you don't know SQL

  • RE: Opinions Re SSAS 2008 Over 2005

    Followup and another question. We've installed SSAS 2008R2 on a test box and I've started fiddling with it but I don't see any differences that look like "big" differences. The...


    Cursors are useful if you don't know SQL

  • RE: SQL Server Agent Jobs – Displaying Status in an Application

    You need to tell the user the status of a job (sql job name is known) that was kicked off at a known date and time. Unless there's something else...


    Cursors are useful if you don't know SQL

  • RE: SQL Server Agent Jobs – Displaying Status in an Application

    Re <>

    It was only a matter of time....

    http://news.bbc.co.uk/1/hi/world/africa/8248056.stm

    When a co worker sent this to me I replied with

    However it was found that when suitable security and data protection processes...


    Cursors are useful if you don't know SQL

  • RE: Backup & Restoration Script

    Your elapsed minutes calculation is wrong (plug in an elapsed time exceeding 1 hour to see). Change old to new as shown below

    --old

    --cast(datediff(ss,BS.backup_start_date,BS.backup_finish_date)/60 as varchar(10))

    --new

    cast((datediff(ss,BS.backup_start_date,BS.backup_finish_date)/60) - (datediff(ss,BS.backup_start_date,BS.backup_finish_date)/3600) *...


    Cursors are useful if you don't know SQL

  • RE: Converting Row by Row inserts to a single Set Based Insert

    There's probably a better way to do this, but this should get you started. Use COLLATEs on the temp table create if needed. Probably should add an index on the...


    Cursors are useful if you don't know SQL

  • RE: Deadlocking while running constant inserts/updates against tables

    50 deadlocks over a weekend is not insane. (It's not terrific, but not insane)

    You realize you can now (>=SQL2005) trap deadlocks in your TSQL with a try/catch (hereafter TC) block,...


    Cursors are useful if you don't know SQL

  • RE: Table Fragmenting and I cant figure out why.

    Please post the table definitions and the code that copies a to b


    Cursors are useful if you don't know SQL

  • RE: Backup and restore from another server

    I do something similar-- but I do it daily. I don't try to restore/backup on UNCs since that can be slow and there can be reliability issues.

    (I don't think linked...


    Cursors are useful if you don't know SQL

Viewing 15 posts - 61 through 75 (of 100 total)