Forum Replies Created

Viewing 15 posts - 166 through 180 (of 331 total)

  • RE: Insert into ##Table from linked server

    Because temporary tables always end up in tempdb - so the temporary table reference would try to resolve from the local server. You might be able to use server.tempdb..##tablename though,...

  • RE: Triggers and Temp Tables

    Steve Jones - Editor (9/22/2009)


    Tables with ## are global, seen by other connections. The disappear when dropped or when the instance restarts.

    That's not actually correct. They disappear when the following...

  • RE: Join terminology

    That's a mixture of a new style JOIN and an old style JOIN

    I could do

    SELECT * FROM table1, table2 WHERE table1.col = table2.col

    That's an old-style join

    What has been done...

  • RE: What is Exchange Event in dead locks?

    Grant Fritchey (9/22/2009)


    Must be something wrong with my browser. I can only see SPID 60 and that only once.

    Nope - your browser is fine.

  • RE: The Dynamic Tally or Numbers Table

    Top job Lynn.

    It's this sort of article that really keeps me on my toes with respect to the SQL I write - there's almost always a better way, and this...

  • RE: Change DOCX to DOC in SQL

    If you're saying you have a load of DOCX documents in BLOBs then I would advise you to export them, use a batch converter, and import them back in.

    Trying to...

  • RE: Problems with MAX

    Another

    WITH HighestYears AS (

    SELECT *, ROW_NUMBER() OVER (PARTITION BY [LRSN] ORDER BY [EFF_YEAR] DESC) __rn

    FROM dbo.VALUATION)

    SELECT *...

  • RE: Insert and Delete between staging and destination tables

    I know this is the 2k5 forum - but if you have the opportunity to use 2k8, you might want to look at MERGE.

  • RE: Are the posted questions getting worse?

    Roy Ernest (9/21/2009)


    So the standard will be pretty high...

    Well it is called SQL Server Standard 😀

  • RE: Are the posted questions getting worse?

    bitbucket-25253 (9/19/2009)


    Slide 19 states that 625K rows were selected from a 1 trillion row table in .11 seconds (Yes that is 11 hundredths of one second).

    Are you sure? Reason I...

  • RE: Please review BCNF (Put things where it belongs)

    David Portas (9/19/2009)


    Fair points Matt. So to extend the psychological convenience argument, if I find it convenient NOT to have a primary key because in some particular case I don't...

  • RE: Please review BCNF (Put things where it belongs)

    David Portas (9/19/2009)


    Of course I agree that candidate keys and foreign keys are important in database design. The practice of designating one candidate key to be "primary" however is essentially...

  • RE: Please review BCNF (Put things where it belongs)

    David Portas (9/19/2009)


    The important question is not "what should be the primary key?" but "what are the business rules?". That's why I deplore the primary key concept, which I'd like...

  • RE: Qry Performance

    Lynn Pettis (9/18/2009)


    Building on this, empid isn't even in the index, so sounds like a good possibility for a table scan.

    ...in fact - do we even know that that index...

  • RE: Qry Performance

    Ian Scarlett (9/18/2009)


    There's a good chance that this

    (empcode between '99201' and '99205' or empcode between '99211' and '99215' or

    empcode between '99241' and '99245' or empcode between '99354' and '99355'...

Viewing 15 posts - 166 through 180 (of 331 total)