Forum Replies Created

Viewing 15 posts - 3,226 through 3,240 (of 5,502 total)

  • RE: need some help on a pivot

    torpkev (6/29/2010)


    That worked perfectly, thanks so much..

    I was pretty close in what I had but wasn't quite there.. and the link on dynamic cross tab sounds pretty interesting - 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: need some help on a pivot

    Here's a code snippet that should get you started.

    If you have variable Departments you might want to consider using the DynamicCrossTab approach. If you're not familiar with it you...



    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 row for comma seperate

    gideon.kahl (6/28/2010)


    Thanks for everyone's contributions. I wasn't the one asking the questions, but I learned a lot from the post.

    Wayne's solution above is by far the most efficient of...



    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 row for comma seperate

    WayneS (6/28/2010)


    lmu92 (6/28/2010)


    Ok, kinda funny I had to go back to this post within just a few hours...

    The first person who "forced" me to do it actually created...



    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: Is there a quick way to query what sql agent jobs did not start at all?

    Will one of the following queries get you started?

    SELECT *

    FROM msdb..sysjobactivity

    SELECT *

    FROM msdb..sysjobhistory

    SELECT *

    FROM msdb..sysjobs



    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 row for comma seperate

    WayneS (6/28/2010)


    lmu92 (6/28/2010)


    @Wayne: any specific reason not to use the VARCHAR(8000) version (aka dbo.DelimitedSplit8K) in this case?

    Lutz, I'm just giving you a chance to show a better approach. 😀

    Seriously, I...



    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: Getting RowCount of Large Table

    Jeff Moden (6/28/2010)


    Except for the fact that I'm generally against using INT to store ISO dates, there's no need to change it here because it won't help for this particular...



    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: Avoiding a Cartesian Join - Full Outer Join On Same Table with different criteria and multiple rows either side

    Ok, you've done the first step already (create a query using fake table names).

    The next step would be to post the fake table DDL and the insert scripts for 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: Getting RowCount of Large Table

    Jason Messersmith (6/28/2010)


    There is no gain with using Count(*), yup everything is running on an index

    Can you post the create index script for the related index?



    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: SQL Statement to return clomns as rows

    Using Dans ready to use sample data I'd go with the following solution:

    SELECT ServerName,PartNum, PF

    FROM

    (SELECT PartNum,ServerA,ServerB,ServerC,ServerD

    FROM @t) p

    UNPIVOT

    (PF ...



    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 row for comma seperate

    @Wayne: any specific reason not to use the VARCHAR(8000) version (aka dbo.DelimitedSplit8K) in this case?

    And I second bteraberry: The other approaches are known as listed under "not recommended". 😉



    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: Getting RowCount of Large Table

    Any particular reason for not using COUNT(*)?

    But more interestingly: is there any index available supporting the WHERE clause?

    If not, can you change it to benefit from an existing index (e.g....



    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: Avoiding a Cartesian Join - Full Outer Join On Same Table with different criteria and multiple rows either side

    Sounds like homework to me...

    If so, you should show us what you've tried so far and where you get stuck.

    We might be able to give you a hint towards 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: Convert CSV values in three columns to rows

    Glad we could help 😀

    But you did the most important part by providing ready to use sample data, by showing what you've tried so far and clearly explain what your...



    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 (6/28/2010)


    Here is why he couldn't change his call after seeing it in instant replay, he is bound by the same Laws of the Game as the players 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]

Viewing 15 posts - 3,226 through 3,240 (of 5,502 total)