Forum Replies Created

Viewing 15 posts - 3,046 through 3,060 (of 5,502 total)

  • RE: Can I use pivot on this query?

    I think we need some sample data. You could also reduce the table def to the columns required. This would also reduce the amount of sample data to be generated...



    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: Save row counts of multiple query results

    Wouldn't it be easier to do it in one query? Or am I missing the obvious?

    SELECT land1, COUNT(*)

    FROM kna1

    WHERE land1 IN('SE', 'FI')

    GROUP BY land1



    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: reading external xml into a table

    Well, maybe the information provided so far cannot be used to answer your question...

    Please attach both xml files and provide the DDL script for the [File] table.



    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: Stored proc and data access

    Create a user role with SELECT permissions on the views and DENY SELECT on the source tables. This will be a lot easier to setup and maintain than the trigger...



    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 I use pivot on this query?

    Please post table def and some sample data in a ready to use format for the following tables:

    CASES, PROPERTY, CASEEVENT, and CR_REPORTPERIODS.

    Also, please post your expected result based on those...



    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 get consecutive record number in two select statement

    You could wrap your UNION statment in a subquery or CTE. This way you could save one sorting operation by moving the ROW_NUMBER() function to the outer SELECT.

    At a first...



    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: ' Conversion failed when converting datetime from character string. '

    First thing to say: storing date values as varchar is a really bad design idea. SQL Server came up with DATETIME and SMALLDATETIME for as reason!

    Regarding the error: Other than...



    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 I use pivot on this query?

    Please post table def and some sample data in a ready to use format. There might be an easier way 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: Group By WEEK

    ColdCoffee (8/2/2010)


    jvanderberg (8/2/2010)


    dateadd(wk, datediff(wk, 0, @ThisDate), 0)

    This will convert a date into the first Monday of the week that contains it. Group on this date.

    Check out Lynn Pettis' wonderful...



    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 extract a delimited value from the table

    chandrasekaran.ganapathy (8/2/2010)


    Can any give me the easiest way to check?:

    Yes: see my previous post.



    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 limiting a result set

    I was hoping you just selected the wrong forum to post in so we could use ROW_NUMBER()...

    But since you're at SQL2000 I would use the "quirky update method" as described...



    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 limiting a result set

    Please confirm that you're using SQL2000 and not 2005 or 2008.

    If SQL2000: can we add one more column to the temp table as well as a clustered 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: Load XML data into SQL Server table using XQUERY

    Here's what I came up with. Since I didn't know if you need the values for attribute B or the element name A I included both.

    I don't know of 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: The "Numbers" or "Tally" Table: What it is and how it replaces a loop.

    mirzafahad1409 (7/31/2010)


    Thanks jeff for the speedy reply.

    First i will post my probs in details.

    I have a Excel file.With columns HB_ID,Firstname,LastName,Phone_Numbers,E-mails,Companies.(This is my "Source" File).

    Now i have to create a Destination...



    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 extract a delimited value from the table

    You would need a split string function.

    Search this site for "DelimitedSplit8K" for a very fast T-SQL solution.

    Or have a look at Florian's blog for a comparison of different solutions including...



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