Forum Replies Created

Viewing 15 posts - 1,591 through 1,605 (of 3,008 total)

  • RE: Trapping for Foreign Key Constraint Errors

    delete from MyTable

    where

    --- All Other Selection Criteria ---

    and MyTable.ForeignKeyColumn not in

    ( Select MyOtherTable.PrimaryKeyCol from MyOtherTable )

  • RE: How I can make look like I expert on SQL Server?

    Gianluca Sartori (10/8/2009)


    It's quite frurstrating that the only other Italian person I ever found on these forums is such a fool.

    You're #1 :exclamationmark:

  • RE: Row Locking Issue

    hefterr-972543 (10/6/2009)


    Hi Michael,

    I'm not familiar with an

    "..do an UPDATE with an OUTPUT clause"

    Can you provide a simple example?

    Thanks again,

    hefterr

    DECLARE @Ctr table( Counter int NOT NULL)

    UPDATE CONTROLTBL

    SET

    Counter = Counter +1

    OUTPUT

    INSERTED.Counter

    INTO

    @Ctr

    --...

  • RE: Formating time over 1 day

    select

    [HHHHH:MM:SS] =

    right('00000'+convert(varchar(20),Seconds/3600),5)+

    right(convert(varchar(20),dateadd(ss,Seconds%3600,0),108),6)

    from

    (

    ...

  • RE: Foreign Keys Vs Indexs

    A foreign key by itself does not create an index, so it is a good practice to create a matching index on all foreign keys.

  • RE: Row Locking Issue

    Instead of doing a SELECT and then an UPDATE, do an UPDATE with an OUTPUT clause so that everything happens in one statement.

  • RE: Is Your Server Vendor Providing the Quality, Innovation, and Support You Need?

    Robert.Smith-1001156 (10/6/2009)


    I'm reminded (and I'm dating myself here) of comedian Lily Tomlin's character Geraldine the Telephone Operator and her famous line "We're the Phone Company, sir. We don't have...

  • RE: Age Banding (for a beginner, please!)

    Function F_AGE_IN_YEARS in the script in the link below calculates age in years from @START_DATE through @END_DATE and returns the age as an integer.

    Age Function F_AGE_IN_YEARS

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=74462

  • RE: Computing age in months with decimal accuracy

    There problem is that a month is not a set amount of time, so you have to define exactly what a half month and full month are?

    If you are born...

  • RE: Generation X

    IceDread (10/5/2009)

    While I'd argue that there are lots of people that does not want mankind to go forward, like the Christian Church attempts to stop Scientists and control societies as...

  • RE: SAN v SQL Server backups

    That is exactly what I would expect in a hosting environment.

    I have yet to encounter a hosting vendor that had any real knowledge about backup and recovery for SQL Server.

  • RE: The Incidental DBA

    In terms of incidental DBA, I would define best practices in terms of what is least likely to let them shoot themselves in the foot and most likely to have...

  • RE: The Incidental DBA

    I think the way Microsoft has positioned SQL Server in the market place has a lot to do with this. The idea is to make a full featured database...

  • RE: Generation X

    I think that younger people can have a different view of technology than people that are a little bit older. They may be past the point where it is...

  • RE: Bit by the SQL Autogrow bug

    This script is used to shrink a database file in small increments until it reaches a target free space limit.

    Shrink DB File by Increment to Target Free Space

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=80355

Viewing 15 posts - 1,591 through 1,605 (of 3,008 total)