Forum Replies Created

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

  • RE: sql maths:price / ? --> one decimal before the last digit

    select x= 000031761*0.1

    Results:

    x

    ---------

    3176.1

  • RE: SQL Server equivalent for PG Dump

    Use BACKUP and RESTORE. You can refer to SQL Server 2005 Books Online for detailed information on how to do this, starting with the link below.

    SQL Server 2005 Books...

  • RE: Combine Datetime

    select

    NewDate = dateadd(hour,a.TM/100,dateadd(minute,a.TM%100,a.DT))

    from

    ( -- Test Data

    select DT = convert(datetime,'2006-08-21'), TM = 1123

    ) a

    Results:

    NewDate

    -------------------------

    2006-08-21 11:23:00.000

    (1 row(s) affected)

  • 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...

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