Forum Replies Created

Viewing 15 posts - 47,836 through 47,850 (of 49,552 total)

  • RE: When To Use Cursors

    Sharon Matyk (1/3/2008)


    2) add a value which is the difference (in INT) between each row's date and the date on the row above.

    This can be done with what I...

    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: Writing Triggers in SQL2000

    Yup. Pretty much. Just check what you need to audit. You don't want to do more than necessary. It shouldn't be necessary to og both the old and the new...

    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: magic table in sql

    karthikeyan (1/3/2008)


    select @Age = inserted.Age from inserted -- You can't use this table outside of trigger.

    And what happens if I insert more than 1 row in a single statement?

    -- How...

    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: Begin,RollBack,Commit

    Some comments on that.

    You have to check for an error after everty statement. @@Error only refers to the previous statement. If that ocmpleted succcessfully, then @@error = 0, otherwise 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: A New Year

    Good luck on the job hunt. 😉

    I gave up on new years resolutions a while back but...

    Brush up on C# skills

    Spend more time on university work

    And a couple others I...

    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: Query is slow when variable is used

    When you use a variable in the where clause, the query optimiser cannot see the value of that cariable at the time the query is compiled and optimised. Since the...

    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 do I delete excess transaction logs.

    Check that the tran log backups are running. How often do they run?

    Run this query for the DB with the problem. Please post what it returns.

    select name, recovery_model_desc, log_reuse_wait_desc from...

    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 do I delete excess transaction logs.

    Is your database in full recovery mode?

    Do you have transaction log backups occuring regularly?

    Do you need to be able to resore this database to the moment of failure if something...

    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: What is use of FULL TEXT INDEX ? hOW & WHEN USED?

    Please don't cross post. It fragments replies and wastes people's time.

    Any replies to below thread please

    What is use of FULL TEXT INDEX

    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: Finding Current Month's First Day& Last Day

    Jeff Moden (1/2/2008)


    Heh... for the same reasons, I do the very same thing. In fact, I incorporated that same method into the SQL Standards I wrote for work because...

    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: Finding Page Splits

    Not what I'm looking for. Dividing the number of rows by the page count will get the average number of rows per page.

    What I'm trying to get is the...

    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: INSERT

    What error are you getting?

    Edit: Why not just exec the proc? There's no point to a temp table in the code you posted.

    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: Finding Current Month's First Day& Last Day

    Michael Valentine Jones (1/2/2008)


    I prefer to write date queries in the form of greater than or equal to a start date time, and less than an end date 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: sys.Objects$ - Any way to see it?

    Pleasure

    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: To Generate More than One Billion Numbers on the fly

    EdVassie (1/2/2008)


    Aye, but you can use OPTION (MAXRECURSION 0) to allow unlimited recursion, and get billions of rows in the result set if you need them.

    Cool. Didn't notice that. Thanks

    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 - 47,836 through 47,850 (of 49,552 total)