Forum Replies Created

Viewing 15 posts - 34,501 through 34,515 (of 49,552 total)

  • RE: Trigger don't run in SQL2008 but did in SQL2000 en 2005

    Doesn't matter how unique the fields are.

    I'm not talking about the update in the trigger, I'm talking about the insert/update that fires the trigger.

    If anyone ever inserts or updates more...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Trigger don't run in SQL2008 but did in SQL2000 en 2005

    h.wijnbergen (1/22/2010)


    And now it works, anyway thanks for your comments.

    It's still not going to work properly if you insert or update more than one row at a time.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Error I am getting " Invalid operator for data type"

    Could you post the definition of the bltTssVeh table please?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Guidance needed in Indexing

    Two options.

    1) Create a primary key on those columns.

    2) Create a surrogate pk (int identity perhaps) and then put a unique constraint on those two columns.

    There's lots of debate which...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: SQL tables

    Query the sys.columns view. Join it to sys.tables for the table name, or use the object_name function.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Created Date of a Record in a Table

    parthi-1705 (1/22/2010)


    What is mean by No space to create a new table with the column.? what are you trying to say

    ALTER TABLE MYTABLE ADD date DATETIME

    go

    ALTER TABLE dbo.MyTABLE ADD CONSTRAINT

    DF_MyTABLE_date...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Transaction Log Backups

    Because of the index rebuild. It touches every row of every table, and all of that is logged

    Two questions on your maint plan.

    Why are you rebuilding and reorganising? Rebuild does...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Error I am getting " Invalid operator for data type"

    You're missing half of your insert statement. It needs to be one of the following forms.

    INSERT INTO ...

    SELECT ...

    or

    INSERT INTO ...

    VALUES ...

    Other than that, there's nothing I can see wrong,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: how to import data from Excel to table

    Please don't cross post. It just wastes peoples time and fragments replies.

    No replies to this thread please. Direct replies to: http://www.sqlservercentral.com/Forums/Topic845221-145-1.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How to get this?

    Is this homework? If not, what are you trying to get here? I don't understand the reason.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Created Date of a Record in a Table

    dp-01 (1/22/2010)


    My table does not have a created date or modified date column.

    My query is to get the created date of all the records in a particular table .Is it...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Performance and/or deadlock problems inserting in large table with statistic data

    Switch traceflag 1222 on. That will result in a deadlock graph been written to the error log every time a deadlock occurs. Post the result of that graph here.

    DBCC TRACEON(1222,-1)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: DISASTER RECOVERY PLAN

    No.

    Disaster recovery plans are specific to the scenario you have. Your servers, your setup, what kind of high availability you have, what kind of downtime and data loss is acceptable,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Sql server computed field

    You don't specify a data type when creating a computed column. The data type depends on the result of the expression.

    Create table #Test (

    emp_id int,

    emp_Birth_Date DATETIME,

    emp_Age AS datediff(d,emp_Birth_Date, getdate())

    )

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Deadlock - How to fix offending code?

    ang-473999 (1/21/2010)


    I set the switch last night. The error log showed a long deadlock-list which is decoded in my post above.

    Post it please (as an attachment if it's big)....

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 34,501 through 34,515 (of 49,552 total)