Forum Replies Created

Viewing 15 posts - 121 through 135 (of 428 total)

  • RE: Try to enclose ' within SQL Output

    Let me correct myself: in sql 2005 and earlier the value would be truncated, from 2008 the function will return null if the input is over 128 characters loing.



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Try to enclose ' within SQL Output

    Jeff Moden (4/9/2012)


    As an alternative...

    + ' SET insert_date = ' + QUOTENAME(@InsertDate,'''')

    Be warned though that the parameter and return type of quotename() is sysname, i.e. any value you put...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Need to Filter Query by Schema

    You seem to be in a real hurry for an answer, but maybe you should reread your question before becoming aggitated. What do you mean to say with "filter the...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Basics of XML and SQL Server, Part 2: Shredding XML

    Excellent! Looking forward for it. And thanks a lot for the series.



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Combining union and union all

    Yes, you're right. Forgot about that. It's just for setting up the sample data, the union will still behave the same given the same data. i.e. if you insert the...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Basics of XML and SQL Server, Part 2: Shredding XML

    aschaffer (3/14/2012)


    Sorry if I missed it, but a request that when offering a part X of Y series of articles, to please include links to the previous articles in the...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Need ideas on query performance

    Ok then. Why don't you approach the problem from the other end: if finding the 'holes' in your large set of table A records is the issue, why not keep...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Need ideas on query performance

    And what about this? I've often seen left outer join with a "is null" check on (one of) the key columns of the right table in the where clause outperform...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Basics of XML and SQL Server, Part 2: Shredding XML

    Looking forward for your article on XML DML! I've tried many things, but so far I failed to find any useful patterns to use the .modify() method.

    My attempts so far...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Basics of XML and SQL Server, Part 2: Shredding XML

    Yet another tip: the use of OPENROWSET requires permissions many admins will not allow end-users to have on production machines as it opens up many security holes. There is however...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Basics of XML and SQL Server, Part 2: Shredding XML

    Nice sum up of the various possibilities indeed.

    A remark: though I understand you had to keep each section brief because you wanted to cover all topics, I think you could...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Combining union and union all

    L' Eomot Inversé (3/9/2012)


    Nice question, and the explanation has provoked an interesting discussion.

    Now there's maybe a problem with the explanation adopted as the result of that discussion: is it...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: how to properly put variable into SQLString

    The advantage of a global temp table is that you can read/write it from another process. The disadvantage is that you can only have one global temp table with the...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: how to properly put variable into SQLString

    The 1st parameter to sp_executesql contains the T-SQL text you need executed. This text may contain any number of variables, in any order and the same parameter may be used...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: INSERT INTO MULTIPLE TABLES AT ONCE

    If you create a view over the both tables, having columns ID and E1 through E12 you can insert into both tables using 1 insert statement. Such a view is...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

Viewing 15 posts - 121 through 135 (of 428 total)