Forum Replies Created

Viewing 15 posts - 3,541 through 3,555 (of 5,502 total)

  • RE: How do you count number records added in recent period

    samtrenchard (5/12/2010)


    No sample data, no attempts to solve so far. This is still at the theoretical stage - essentially how do you calculate a moving (sliding) period aggregate !

    Answering using...



    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: Killer query, too muc for t-sql

    @mike-2:

    the recursice CTE apporach is one possible solution. But as soon as there is a larger data volume to deal with, the quirky update is the better choice (from...



    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 obtain week by week plus YTD totals

    What's still missing is your expected result set based on your sample data.

    Your reference to your first post won't help here since there is no way to tell whether 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: select top 1 * from table is slow?

    CirquedeSQLeil (5/11/2010)


    lmu92 (5/11/2010)


    CirquedeSQLeil (5/11/2010)


    ...

    As for the select top 1 *, the application may be doing that in order to populate a data grid with the column names.

    ...

    If that's the only...



    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: select top 1 * from table is slow?

    CirquedeSQLeil (5/11/2010)


    ...

    As for the select top 1 *, the application may be doing that in order to populate a data grid with the column names.

    ...

    If that's the only purpose 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: select top 1 * from table is slow?

    The big question is: TOP 1 ordered by what column?

    You should figure out what criteria will define the order to select top 1 and add those as an ORDER BY...



    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: Monthly Data

    a few things I noticed:

    If the columns from_date and to_date contain date values, you should store them as datetime data, not as int.

    Based on your description it's unclear how @date,...



    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: problem importing data from a huge xml file 1g

    sohairzaki (5/11/2010)


    where shall i use the crossapply

    thanks a lot

    Use it like the sample I posted in one of your other threads ("Node.value and insert the result to an existing table").

    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: While Loop Much Slower than LOCAL FAST_FORWARD READ_ONLY Cursor

    Actually replacing a c.u.r.s.o.r. with a loop is like choosing pest over cholera...

    Based on what you describe you don't need a RBAR solution.

    I'm confident Jeff Modens "Running Total"...



    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 obtain week by week plus YTD totals

    My I ask you again to run the code you provided to genarate the test data?

    Strong hint (among others):

    You have the following statement in your code

    INSERT INTO [FIB].[dbo].[HHSReportsData]

    ...



    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 obtain week by week plus YTD totals

    Please try to run the code you provided to generate the sample data. It won't run...

    I don't mind adding a few comment marks or removing commas. But at least 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: How to obtain week by week plus YTD totals

    Two more things I'd like to know:

    1) what is your expected result based on your sample data? and

    2) What have you tried so far?



    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 reduce xml file size by using ssis xml task xpath to extract only required information but got a problem

    Since this is your third thread regarding this issue I recommend you include the reference to thos threads so you wouldn't have to deal with solutions that would not consider...



    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: problem importing data from a huge xml file 1g

    Another reason might be the way you actually query the data.

    Instead of going three levels deep in your xml query I'd rather use CROSS APPLY (as recommended in the other...



    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: Select (master/detail) sort of

    The concept is called "CrossTab". A related article is referenced in my signature. For a dynamic number of columns please see the DynamicCrossTab article...

    DECLARE @master-2 TABLE(mf1 CHAR(2),mf2 INT,mf3 INT,mf4 VARCHAR(30),mf5...



    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,541 through 3,555 (of 5,502 total)