Forum Replies Created

Viewing 15 posts - 4,201 through 4,215 (of 5,502 total)

  • RE: How to import XML data into a table

    The max size is for data stored with xml data type is 2GB. I don't know if your file would exceed those limit...

    Regarding extracting node names and values I would...



    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: best way to display breakouts with sum totals?

    Peter Brinkhaus (2/23/2010)


    ...

    SELECT

    COUNT(CASE WHEN live = 'Y' AND disab = 'N' THEN 1 END) * 100. / COUNT(*)

    FROM

    @tbl

    WHERE

    live <> 'I'

    Peter

    Excellent job, Peter!!

    If I had...



    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: best way to display breakouts with sum totals?

    First and second cte are used to populate the count() values as requested.

    The CROSS JOIN will result in a cartesian product of all rows from the first cte (cte) and...



    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: Display Hierarchy in SQL2008

    Please have a look at BOL (BooksOnLine, the help system installed with SQL Server). Especially look for "Manufacturing Scenarios, example A: Viewing a multilevel bill-of-materials list for a parent product"

    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]

  • RE: nvarchar(max) replace truncation in SQL2005

    My last post didn't recognize your latest reply. So please ignore it.

    Glad it finally worked out. 🙂



    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: nvarchar(max) replace truncation in SQL2005

    Would you please provide the script you're using to update your table together with some sample data that will show the effect you get?



    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: nvarchar(max) replace truncation in SQL2005

    What exactly do you mean by "getting truncated"? Since you only do a SELECT it might be the influence of the length setting for the output of SSMS (Management Studio)....

    Here...



    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: Create table dynamically using loop

    What is the specific reason for building one table per month instead of adding the related column to one table and (if required) use horizontal partitioning?

    How many rows you end...



    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: best way to display breakouts with sum totals?

    I'm still not 100% sure what value your percentage calculation will be based on. But maybe the following code will get you started.

    Please note how I provided sample data in...



    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: Trying to max performance in this TVF

    Drammy (2/23/2010)


    Ah, thanks guys - I have actually already used a tally table in another part of the same solution, although it was a couple of years ago, clever stuff...

    I'll...



    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: UNION a series of TOP statements

    It's interesting to see that SET DATEFIRST actually takes precedence over SET LANGUAGE. I couldn't find any hint about it in BOL so far...

    Here's an example:

    If you change the language...



    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: Splitting a row into multiple rows based on an attribute

    Following please find an example of how I would do it.

    Instead of creating the numbers table on the fly I usually would use my Tally table. If you don't 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: Stop running sql queries from backend

    Like I stated before:

    change the communication between your app and the db to stored procedures only and lock down everything else. Once you're done with it, add your users 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: Stop running sql queries from backend

    Jeffrey Williams-493691 (2/22/2010)


    ...

    If so, then you need to make sure the user accounts in SQL Server only have the privileges necessary to execute the stored procedures your application calls. ...



    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: Pivot Query- need help

    Glad I could help 🙂

    Come back to this site if you need further assistance.

    But remember: one post is better than 6! 😉



    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 - 4,201 through 4,215 (of 5,502 total)