Forum Replies Created

Viewing 15 posts - 5,236 through 5,250 (of 5,502 total)

  • RE: XML Record set

    Would you please post sample data and expected results together with the code you've tried so far?

    To post xml code please use [ code="xml" ] tag.

    Also, why do you specifically...



    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: Help with SQL algorithm to process transactions

    First of all, thank you for the way you've provided the sample data! Good job! 🙂

    I'm not a "SQL master" but I'll try to do my best... 😉

    One thing is...



    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: server memory low during xml import in ms sql table xml size is near about 4 GB

    The approach itself is indeed simple...

    As far as I can see it's the document size (4GB) together with the way it's handled that causes low memory.

    I recommend you change 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: script task in sql server

    Please have at look at BOL (BooksOnLine), section "ROUND function", sub section "C. Using ROUND to truncate".

    Just out of curiosity:

    Is it a coincidence having almost the identical question on...



    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 help creating several excel or access files from a query

    There are four ways I can think of right now:

    1) from the "target system" (Excel or Access), connect to the SQL Server and select the values you need,

    2) use T-SQL...



    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: float variable in script task of SSIS

    Please have at look at BOL (BooksOnLine), section "ROUND function", sub section "C. Using ROUND to truncate".



    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 Help in aggregate query

    Your expected output doesn't match the sample data provided and the day column contains invalid dates.

    So the following solution is untested:

    SELECT MIN(CONVERT(CHAR(10), a.DateTimeHours,120)), l.LocationFromLocationTo , AVG(a.Amount) as AvgAmount

    FROM tblAmount...



    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: can't get count() to work for group by select with min and max

    You're welcome, again. 🙂

    It's always good to get some feedback how the proposed solution works out for the OP. Thank 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: This should be a simple join

    The translation of your requirement sounds like:

    SUM(actual labor) GROUP BY batch, warehouse.

    The actual labor cost is not directly stored in You're also mentioning a product ("labor per product").

    If this is...



    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: can't get count() to work for group by select with min and max

    after playing around a little bit I found another way to do it which might be faster on larger amount of data, since it's using less subqueries.

    The "trick" is 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: can't get count() to work for group by select with min and max

    You're welcome! 🙂



    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: can't get count() to work for group by select with min and max

    DECLARE @t TABLE (CTL VARCHAR(10), SI INT)

    INSERT INTO @t

    SELECT ' LG',0 UNION ALL

    SELECT ' BSL',41 UNION ALL

    SELECT ' SX',19 UNION ALL

    SELECT '...



    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: Calculate 3 week average

    Hi,

    the following code uses a CTE to select the first day of the range.

    This first day then is applied to the table and used for grouping.

    DECLARE @Hist TABLE (Seq INT...



    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: can't get count() to work for group by select with min and max

    the data would have to be broken up into separate results then a final query run on the data

    is a little more detailed explanation what I was thinking of when...



    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: can't get count() to work for group by select with min and max

    I don't really understand what you're looking for...

    Assuming you don't have duplicate values in col [si], you should get "1" for count(min) and "1" for count(max), once the syntax is...



    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,236 through 5,250 (of 5,502 total)