Forum Replies Created

Viewing 15 posts - 5,356 through 5,370 (of 5,502 total)

  • RE: How to Pivot without an aggregate

    That's strange...

    The @sql variable is declared as nvarchar(max). So it should allow to store more than 8000 character.

    Could you provide sample data (as attached file) that would (slightly) exceed...



    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: How to Pivot without an aggregate

    Just change the col type of caseid in #test to uniqueidentifier.



    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: How to Pivot without an aggregate

    Hi,

    I didn't notice that the resulting columns need to be dynamic. Sorry.

    As far as I know, dynamic pivots only can be done using dynamic SQL.

    In order to sort the result...



    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: How to Pivot on a column which may have various counts per row

    Please don't cross post.

    further discussions please on thread http://www.sqlservercentral.com/Forums/FindPost723433.aspx



    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: How to Pivot without an aggregate

    Hi,

    maybe you could start with the code snippets from this post http://www.sqlservercentral.com/Forums/FindPost714447.aspx

    The problem looks similar.



    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: Output XML File Using Office Open XML Standard

    Hi,

    would you please be a little more specific on what you're trying to do?

    For reference on how to post data please see http://www.sqlservercentral.com/articles/Best+Practices/61537/.

    For a start you could look up "FOR...



    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: How many bottles will fit in a box?

    Hi Barry,

    focussing on the question of the OP you're right that a rectilinear arrangement or any other structured solution won't be an optimum (even for boxes).

    What I had in mind...



    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: How many bottles will fit in a box?

    Based on the link Barry's previous post an additional question needs to be answered:

    Are you looking for the number of equally shaped bottles per box (meaning all bottles have the...



    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 Help

    AlexT (5/14/2009)


    Yes, very interesting point of view, but syntax is looks very complicated.

    old style do the same and looks much clearer

    DECLARE @Table TABLE (CUST_NO INT, PriceRule CHAR(1), Discount numeric(8,2))

    INSERT into...



    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: XML Nodes Problem

    You're welcome. Glad I could help!



    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: XML Nodes Problem

    Hi,

    the problem is that you're selecting from an XML string with a namespace.

    You need to declare the namespace in your select statement.

    Running the following code should return 'GB'.

    Note: Make sure...



    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: How can I execute a stored procedure as a job?

    Did you look up "job steps [Transact-SQL]" in BOL?

    It'll give you a lot information on how to set up a job either using TSQL or Management Studio.



    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?

    GilaMonster (5/13/2009)


    I don't know how easy it'll be to get a laptop with XP on it now.

    As far as I know a DELL can be shipped with downgrade rights 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: Transposing data from Columns to Rows

    Are you using SS2K or SS2K5?

    Based on the forum you posted in I assume SS2K, but need to make sure before posting a non-working/inefficient solution.



    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 Help

    I'm glad I could be of some help!

    Even though Microsoft claims that the PIVOT function is kind'a easy to handle it still takes some time/effort/experience/t&e to finally get it 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]

Viewing 15 posts - 5,356 through 5,370 (of 5,502 total)