Forum Replies Created

Viewing 15 posts - 18,646 through 18,660 (of 49,552 total)

  • RE: Table Trigger works for one user but not the other

    When you say it doesn't work for one user, exactly what do you mean?

    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: Index intersection

    Intersections demoed and discussed here: http://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/

    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: Are the posted questions getting worse?

    Grant Fritchey (5/3/2012)


    Lynn Pettis (5/3/2012)


    SQL Kiwi (5/3/2012)


    Lynn Pettis (5/3/2012)


    SQL Kiwi (5/3/2012)


    One possible test is to imagine one's mother reading the post before hitting 'reply' and wondering if it would make...

    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 Syntax

    Nothing to say on the how, it's the same as any other correlated subquery.

    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 Syntax

    Because the whole point of cross apply it to allow the passing of a column from another table to a function or subquery.

    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 Syntax

    Subqueries in the select and where are allowed to be correlated (to reference columns in the outer query). Subqueries in the from are not allowed to be correlated unless they...

    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: need help with query speed.

    That's not what people are asking for.

    Please run the query with 'actual execution plan' enabled, right click the plan, save as and save it as a .sqlplan file. Attach that...

    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 Syntax

    This is why you should always use qualify your column names.

    This would have thrown an error.

    SELECT *

    FROM @TABLE1 AS T1

    INNER JOIN @TABLE2 AS T2 ON T1.VALUE = T2.VALUE2

    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: How do I get fragmentation levels for indexes...

    jblovesthegym (5/3/2012)


    2) The link does NOT explain how to determine fragmentation, which is the entire point of this thread;

    Really? Quoting from that article:

    Using DBCC SHOWCONTIG to Identify Fragmented Indexes

    When deciding...

    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 Syntax

    Andy Hyslop (5/3/2012)


    How come this syntax runs, the column VALUE does not exist in TABLE3 and therefore I am not SELECTing anything from TABLE3?

    Because there's nothing in SQL that requires...

    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 If statement finds same temp table

    renvilo (5/3/2012)


    GilaMonster (5/3/2012)


    What's the default collation of your database?

    What's the default collation of TempDB?

    Database Default - Latin1_General_CI_AS

    Didn't set any for the TempDB

    Databases always have a default collation, no matter whether...

    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 If statement finds same temp table

    renvilo (5/3/2012)


    GilaMonster (5/3/2012)


    Andy Hyslop (5/3/2012)


    Two options spring to mind

    As your using an IF you obviously only want one query to be executed

    DROP Table #TempProduction before the next IF is evaluated...

    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 If statement finds same temp table

    What's the default collation of your database?

    What's the default collation of TempDB?

    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 If statement finds same temp table

    renvilo (5/3/2012)


    Cool seems to work but I do get:

    Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation

    Lower down in my query. Believe this 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: SQL If statement finds same temp table

    Andy Hyslop (5/3/2012)


    Two options spring to mind

    As your using an IF you obviously only want one query to be executed

    DROP Table #TempProduction before the next IF is evaluated then create...

    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 - 18,646 through 18,660 (of 49,552 total)