Forum Replies Created

Viewing 15 posts - 4,501 through 4,515 (of 5,502 total)

  • RE: Generate even numbers using powers of 2 and tally table

    GSquared (1/13/2010)


    I'd have to see the tests that were done on performance comparisons between the two. In the tests I've done, and in the documentation I've seen on 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: Generate even numbers using powers of 2 and tally table

    You're very welcome, Greg!

    The FOR XML PATH clause is available since 2K5.

    I tried to explain how it works here . Not sure if it helps to understand though...

    Regarding "&":...



    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: Generate even numbers using powers of 2 and tally table

    @Gus (again): Another thought:

    If you'd add AND (@Sum & power(2, Number)) > 0 to your WHERE clause in the Rules CTE you'd get rid of the repetitive Col1=@Col1 part...



    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: Generate even numbers using powers of 2 and tally table

    @Gus:

    Just as a side note: AFAIK varchar(max) columns tend to have a bad influence on performance due to the handling of more than one page (8k).

    I guess, varchar(8000) will do...



    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: PARSE FULL NAME INTO LASTNAME,FIRSTNAME, MI

    Lowell (1/13/2010)


    that would occur if any space existed in the last name, before the slash.

    a name like Mac Bride/Bob Lee would make that happen... you'll need to tweak 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: Generate even numbers using powers of 2 and tally table

    I would use a function to get the "binary pattern". Something like the following:

    CREATE FUNCTION tvf_binarySplit(@a int)

    returns TABLE

    as

    RETURN

    SELECT (@a & power(2,n)) val

    FROM

    (SELECT 1 AS n UNION ALL...



    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 NEEDED TO RETURN A SINGLE ROW FROM MULTIPLE RESULTS

    Here's the solution I'd use as a complete test scenario. (Please note how I defined the sample data in a ready to use format). Also, this is a 2005 solution...



    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 NEEDED TO RETURN A SINGLE ROW FROM MULTIPLE RESULTS

    glen.wass (1/13/2010)


    Never used stuff before

    whats the FOR XML bit used for? as i constantly get a syntax error saying incorrect syntax near xml

    What SQL Server version do 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: import from excel to a sql table

    tkacyndra (1/13/2010)


    i'm using enterprise manager import wizard to import, here is an example of what's going on.

    my table, for example, has the following fields:

    id (self incrementing key field)

    name

    address

    phone

    date_modified (has 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: Need help with comma seperated quoted string

    Please have a look at the TallyTable article linked in my signature. It describes a pretty fast method to split a string.



    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: Import all csv files in a directory without hard coding the file name

    Would you mind sharing how you'll do it?

    One reason is to provide a solution for someone having the same isse.

    The second reason: there might be better/faster/cleaner solutions out there but...



    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 NEEDED TO RETURN A SINGLE ROW FROM MULTIPLE RESULTS

    I have no idea how to program it using a loop. But a set based solution could look like the following (and is usually a lot faster....)

    SELECT

    STAFF_ID,

    stuff(( 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: How to generate master detail xml file in sql 2005 and 2000

    I'll second Johns question regarding more details.

    Please provide table definition together with sample data and expected result.

    Some of us like to provide tested solutions. So you'll increase the number 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: How do I schedule to send out query result in certain format like csv or xls? Thanks.

    You might want to check this thread.

    Seemes like someone finally found a way to do it. I haven't tested it myself though...



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

    Paul White (1/12/2010)


    Perfect Lutz!

    Thank you, Paul! :blush:

    It's starting to pay off hanging around here for a while.... 😉



    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 - 4,501 through 4,515 (of 5,502 total)