Forum Replies Created

Viewing 15 posts - 391 through 405 (of 2,894 total)

  • RE: MERGE & NULL Comparisons

    Do you mean your comparison of TARGET.Column1 <> SOURCE.Column1 is not working when one of this is NULL?

    There are few ways to deal with it. Here is one, I guess...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: How to get date as my column not as row

    DDL of table and sample data in a format of INSERT statements would really help.

    Please read this one: http://www.sqlservercentral.com/articles/Best+Practices/61537/

    If you follow the above, the relevant help will arrive much sooner...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Import of huge XML file

    1. SSIS - use XMLSource

    2. SQLXMLBulkLoad:

    http://msdn.microsoft.com/en-us/library/ms171993.aspx

    http://msdn.microsoft.com/en-us/library/ms171806.aspx

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: views, no lock and cursors oh my....

    richard.noordam (5/22/2013)


    First.... let's just assume i know sets should be used instead of cursors in most cases, and skip all the comments on that.

    Cursors are absolutely fine where relevant.

    Assume we...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: SQl Server 2008 Query Performance

    Bhaskar.Shetty (5/22/2013)


    GilaMonster (5/22/2013)


    Bhaskar.Shetty (5/22/2013)


    but adding indexes for each and every column mince adding overheads on index maintanance also.

    You wouldn't want to do that and it would be entirely useless to...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: List out rows from a duplicate record set that has one or more odd values

    geoff5 (5/22/2013)


    Eugene,

    After reading your explanation of the reason why GROUP BY is more efficient than window functions, I can see the logic in your in-line view solution. I would still...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: SQl Server 2008 Query Performance

    One suggestion Skipping char/varchar columns from groupby clause gives you better query performance, for the final output result where you need Name in your case rejoin the table with...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: List out rows from a duplicate record set that has one or more odd values

    shettybhas (5/22/2013)


    Try the below query..

    SELECT *

    FROM @mySampleTable s

    OUTER APPLY (SELECT TOP 1 CaseID FROM @mySampleTable g WHERE s.CaseID = g.CaseID

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: List out rows from a duplicate record set that has one or more odd values

    geoff5 (5/21/2013)


    Sean,

    I'm not an expert at execution plans, so I can't speak definitively on which approach is more efficient, but intuitively it would seem to me that referencing the raw...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Need Alternate Solution For Cumulative Sum

    The fastest way to calculate "running" total in SQL is here:

    http://www.sqlservercentral.com/articles/T-SQL/68467/

    SQL2012 now has in-build functionality for doing that, but the above method still wins most of the time.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: dropdown list to call different reports based on selection

    It's possible in most of programming languages which can be used to program UI.

    However, T-SQL has nothing to do with it. It's about data.

    What are you using programming in? .NET?...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: List out rows from a duplicate record set that has one or more odd values

    It can be done without using windowed function (so, will have better performance):

    SELECT *

    FROM @mySampleTable s

    WHERE s.CaseID IN (SELECT CaseID

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: join only if the joining column exists

    Use dynamic SQL

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Display -0

    Are you producing the report?

    This one is one of the most stupid requirements I ever seen.

    Zero, as a numeric thing, cannot be negative. Some times it used for...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Proper way to write a sproc

    Are these statements used inside of proc code or outside?

    If the later, then I guess that developer who sent you this code just scripted something in SSMS and...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 15 posts - 391 through 405 (of 2,894 total)