Forum Replies Created

Viewing 15 posts - 47,956 through 47,970 (of 49,552 total)

  • RE: Using T-SQL to Create a PIVOT Table: Invalid Column Name and Invalid Syntax near st

    Scott H. Chang (12/21/2007)


    Hi all,

    IF EXISTS (SELECT PivotedLabTests FROM sys.tables

    WHERE PivotedLabTests = 'pvt')

    DROP TABLE pvt

    Firstly, this....

    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 vs Union ALL

    Please don't create multiple threads on the same problem. It just fragments replies and annoys the regulars.

    Since this is a continuation of your old thread, please continue it there

    Union

    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 the nth max

    Since you're using SQL 2005, you can use the Row_number function. makes this kinda thing very easy.

    Since I also suspect homework 😉 at least until told otherwise, consider this

    ROW_NUMBER() OVER...

    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: Serious Issue

    Autoclose means that when the last connection is dropped from a DB, the DB is shut down cleanly, just as if the server had shut down. While the DB is...

    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: Isnull function

    Hint

    DECLARE @Var1 INT

    SET @Var1 = NULL

    SELECT

    CASE WHEN @Var1 = NULL THEN 'Var1 = Null' ELSE 'Var1 <> NULL' END AS EqualityTest,

    CASE WHEN @Var1 <> NULL THEN 'Var1...

    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 QUESTION

    colin Leversuch-Roberts (12/21/2007)


    I wasn't having a go it's just that I can't believe that a production database wouldn't have an update stats job run every day( night / quiet period...

    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: DBA Roles

    Oh you certainly did. Almost to the coffee over keyboard point. Especially the bat.

    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: Database Column Tuning

    misandrew (12/21/2007)


    only valide for Master database

    for the other USER database

    it produce error !!

    What error?

    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: Detached tempDB and other DBs - SQL is now nonfunctioning

    Shut down the server (if its running) and move the tempdb files back to where they were (and any other files that you moved) then restart SQL. It should come...

    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: Delete and Insert Blocking

    Do you have any indexes other than the one you posted? Especially, do you have a clustered index?

    If you don't have a cluster, I would suggest a clustered index on...

    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: Curiosity won’t hurt this cat…

    The DB restore would have been the cause of the cache flush that you saw in the error log. In this case it's nothing to be concerned with. It's just...

    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 in a sql query :The column prefix 'XX does not match with a table name or alias name used in the query

    What was the problem?

    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 QUESTION

    colin Leversuch-Roberts (12/21/2007)


    I have never ever improved or changed the performance of a database query by updating stats, issuing a full stat scan or rebuilding indexes in a database where...

    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 Problem when using Caching

    Ok.

    As I said, I know very little about notification services. Is there any way to check which query notifications are active in the DB?

    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: Each GROUP BY expression must contain at least one column that is not an outer reference.

    Adam Haines (12/20/2007)


    GilaMonster,

    You are absolutely correct. I forgot to mention that "column2" has to be an actual column in the table for this work. You cannot do this...

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