Forum Replies Created

Viewing 15 posts - 2,656 through 2,670 (of 5,502 total)

  • RE: Update View with Column that performs SUM on two fields from each row

    SUM() is an aggregate function.

    You need to group your data by using GROUP BY in your query. Please have a look at BOL (BooksOnLine, the SQL Server help system usually...



    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 I guess

    I guess what Chris refers to is the FOR XML PATH() concept.

    You might find a suitable solution by searching for "string concatenate for xml path" on either this forum 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: Grouping by within a Top N query

    Are you sure you're using SQL Server 2008????

    The ORA-... error number indicates something different....



    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: Loading two header / detail XML files out of sequence

    I would load the Donation Amount file (maybe the Donation Maker, too) into staging tables first and move into the final table from there. This would allow for any logic...



    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: put subquery as columns

    steve-760524 (10/25/2010)


    Thanks for the help. I read your article on cross tabs but the examples look like they are from 1 table. I have two tables I am trying 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: go command

    You still haven't provided any of the error messages you mentioned. Please post those errors.



    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: include an agregate column within a PIVOT SELECT statement

    First of all: EXCELLENT job providing ready to use sample data, your current solution, current result and expected result. Nothing more to ask for!! THANK YOU!!

    I stopped using PIVOT a...



    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: go command

    What are the error messages you get? The query itself looks fine...

    There can be anything like permission issues, mis-spelled table or column name, data type conflict, foreign key references -...



    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: put subquery as columns

    Toms solution will work if you need to get the image names into one column.

    But if you need to do a pivot (or cross tab) with separate columns per picture...



    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: Stuck on a query

    Hmmm...

    I've re-run your code and get the same results now.

    Must have been a problem with my system back then - either the part behind the screen or in front if...



    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: sphinx24

    spam reported



    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: Stuck on a query

    Ok, here's a slightly different approach.

    When running your second sample, I didn't get yuor expected result. Is that intentional?

    If not, here's a query that will return your expected result 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: Importing XML Files to SQL Tables

    I hope this link will show you some ways to do 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: How to add two #Temptables

    How about

    SELECT your_statement1

    UNION ALL

    SELECT your_statement2

    ?

    Side note: you don't really need to store it in two temp tables before the UNION operation (as long as you don't need those separate...



    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?

    ALZDBA (10/22/2010)


    Jeff Moden (10/21/2010)


    ALZDBA (10/20/2010)


    Dito.

    And it only serves a single purpose. i.e. strict hierarchy.

    Ever tried building a family tree ?

    Thanks for the input, Johan. Heh... from what I've seen,...



    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,656 through 2,670 (of 5,502 total)