Forum Replies Created

Viewing 15 posts - 2,401 through 2,415 (of 5,502 total)

  • RE: Code to summary row

    Thank you Lowell for the sample data.

    I'm constantly requesting the OP to provide the data to verify that

    a) the OP is willing to be actively involved in the solution finding...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Are the posted questions getting worse?

    Lynn Pettis (12/15/2010)


    I'm not in a position to test, but don't you get the same issue when using decimal(19,4) as you do when usinf money?

    Now I may be wrong, but...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Code to summary row

    What is the primary key of that table?

    Why do you have a SUM column in there when the values is supected to change based on user input?

    Also, it seems like...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Removing phone formatting in query

    select REPLACE(phone,'-','') as phone_formatted

    from affiliate



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Are the posted questions getting worse?

    Regarding the money data type:

    Here's an interesting example I just found here

    -- code removed (too much technical stuff in THE THREAD)

    Another interesting article can be found here at SSC



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Code to summary row

    I think you can use UNPIVOT to get your table in a normalized form (using integer values for the former column names). Based on that you'd simply use a SUM()...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: SQL2K -> SQL 2008, EXTREMELY slow cursor fetch

    Did you alter the nonclustered index like I recommended earlier?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: SQL2K -> SQL 2008, EXTREMELY slow cursor fetch

    bkuhnke (12/15/2010)


    Wow, thanks for your efforts in helping me out with this. Greatly appreciated!

    Was there a huge time difference in fetching the rows either with the local static or...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Slight Problem :(

    So you have a database in full recovery mode but no backups?

    What is the backup strategy you use? If you never performed any backup (including transaction log) you must have...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: SQL2K -> SQL 2008, EXTREMELY slow cursor fetch

    I just tested two versions on my SQL2008R2 EXPRESS version:

    DECLARE @CustNum AS INT

    DECLARE myCrsr CURSOR LOCAL STATIC

    FOR

    SELECT number

    FROM master..spt_values

    WHERE TYPE='P' AND number <20

    OPEN myCrsr

    FETCH NEXT FROM myCrsr INTO @CustNum

    WHILE...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Ordinal position within XML

    billj-705548 (12/15/2010)


    Thank you for that method as well Mark. If I'm understanding correctly, this method counts the number of ordinals before the current one -- though I've got to...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: SQL2K -> SQL 2008, EXTREMELY slow cursor fetch

    So I'll stop asking to replace the RBAR then 😉

    Did you try to declare the cursors as STATIC or FAST_FORWARD like I mentionend earlier?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Need some help with a large data volume optimization

    Paul White NZ (12/15/2010)


    LutzM (12/15/2010)


    What would it help in Craigs scenario to lock the door, dim the light and ignore the ringing bell? :unsure: 😀

    The last thing Craig needs right...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Looping though XML Subnode and pass the Identity value

    Here's a "slightly" different approach:

    Instead of Openxml I use XQuery together with CROSS APPLY for referencing outer node attributes.

    To catch the ID values from the insert statements I make use...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Need some help with a large data volume optimization

    Paul White NZ (12/14/2010)


    ...

    There's no Halloween protection with the loop join plan for reasons that should be obvious to anyone that knows what Halloween protection is 😉 😎

    ...

    What would it...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 15 posts - 2,401 through 2,415 (of 5,502 total)