Forum Replies Created

Viewing 15 posts - 2,461 through 2,475 (of 2,894 total)

  • RE: Too many CASE statements...how to avoid??

    Praveen Goud Kotha (8/3/2010)


    Eugene Elutin (8/2/2010)

    I wonder, does original data comes in a such "pivoted" way? I would think that you might have the same data somewhere in a bit...

    _____________________________________________
    "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: Releasing resources

    mike 57299 (8/2/2010)


    I will try the cursor. The set based option works for when I want to do all customers but is significantly slower when I need to do...

    _____________________________________________
    "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: Releasing resources

    mike 57299 (8/2/2010)


    ...

    My issue seems to be in resource management. As shown below, each time stamp represents 1000 records. The first 10000 go very fast, then it drops...

    _____________________________________________
    "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: Too many CASE statements...how to avoid??

    jvanderberg (8/2/2010)


    My guess is that the code posted above with be several degrees slower than the original code. CASE statements, while they can be a mess to read, are...

    _____________________________________________
    "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: Too many CASE statements...how to avoid??

    If you want to reduce using of "case when" statements I would suggest the following:

    1. Create a function to calculate your Range count:

    create function dbo.udf_CalcRange(@minR int, @maxR int

    , @m01 int,...

    _____________________________________________
    "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: LIKE operator with millions of records giving slow performance

    Chris, it's look like OP data is not about person names, its URL names...

    _____________________________________________
    "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: LIKE operator with millions of records giving slow performance

    Chris Morris-439714 (7/29/2010)


    Eugene Elutin (7/29/2010)


    Can you test how long the following query will run and how many records does it returns:

    SELECT a.*

    FROM dbo.Person a

    LEFT JOIN dbo.Person_exclusion b

    ON a.Name LIKE...

    _____________________________________________
    "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: LIKE operator with millions of records giving slow performance

    Can you test how long the following query will run and how many records does it returns:

    SELECT a.*

    FROM dbo.Person a

    LEFT JOIN dbo.Person_exclusion b

    ON a.Name LIKE b.Name_similar

    WHERE b.Name_similar IS NULL

    You...

    _____________________________________________
    "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: LIKE operator with millions of records giving slow performance

    Based on your "new" requirements, I suggest you to read my previous post which can give you an idea of how to try to speed up your process...

    To make it...

    _____________________________________________
    "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: LIKE operator with millions of records giving slow performance

    Santhosh Yamsani (7/29/2010)


    ...

    I tried in following way :

    update a set a.ExclusionID = b.ID

    FROM dbo.Person a

    join dbo.Person_exclusion b

    on a.Name like b.Name_similar

    But it...

    _____________________________________________
    "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: Handle infinite time running queries

    What is a "huge" time.

    Do you want to determine for how long query will run before executing it? - I doubt you can do it, as i depends on...

    _____________________________________________
    "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: Left outer join question

    You should learn how to use table aliases and nicer formatting to make your query a bit more readable.

    Try this:

    SELECT PT.FirstName, PT.LastName, @PayPeriod AS PayPeriod

    FROM...

    _____________________________________________
    "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: The same day(1,2,3..31) of every month.

    If you don't like way posted in Post #958743 (which, as stated could benefit from using permanent tally table) and you don't have Excel to format SQL (as per Post#958732,#958745...

    _____________________________________________
    "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: Help with SQL Coding

    tasnim.siddiqi (7/26/2010)


    Hi,

    Just tested your code. It works fine now. But I dont understand, because the only difference is in the way you declared the table. Now you creating a table...

    _____________________________________________
    "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: Stored Procedures vs. Ad-Hoc SQL in SQL Server 2008

    patil.mangesh.v (7/24/2010)


    We are redeveloping our product from SQL Server 2000 to SQL server 2008(Can go for any RDBMS in future). We have design an application which designs query forms dynamically,...

    _____________________________________________
    "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 - 2,461 through 2,475 (of 2,894 total)