Forum Replies Created

Viewing 15 posts - 16 through 30 (of 57 total)

  • RE: Tally OH! An Improved SQL 8K “CSV Splitter” Function

    @peter-2

    Thanks for the feedback. I've run the test several different ways (current way posted, putting values into a table variable, and single execution statements) and found they produced the same...

    /* Anything is possible but is it worth it? */

  • RE: Tally OH! An Improved SQL 8K “CSV Splitter” Function

    mark hutchinson (5/25/2011)


    @jeff

    Here's an idea to kick around for varchar(max) data...use a tally table (or cte equivalent) to split the very large string into strings less than 8000 characters and...

    /* Anything is possible but is it worth it? */

  • RE: Hidden RBAR: Counting with Recursive CTE's

    Another fantastic RBAR article by the director of DAR, Department of Anti-RBAR!

    One drawback with Itzik-Style Cross-Joins going out to E8 is making sure you limit E8's results as soon as...

    /* Anything is possible but is it worth it? */

  • RE: Returning 0's in a SUM (SQL Spackle)

    Jeff Moden (6/14/2011)


    COALESCE can change the datatype of the result based on which non-null element is selected (which can cause a major performance problem, BTW). ISNULL will keep the...

    /* Anything is possible but is it worth it? */

  • RE: Returning 0's in a SUM (SQL Spackle)

    Alexey Voronin (6/14/2011)


    What's this COALESCE(SUM(SalesTestData.SaleQty),0) ?

    You do not know ISNULL ?

    ISNULL(SUM(SalesTestData.SaleQty),0)

    They are interchangeable. Both are the same thing except COALESCE() allows for more than one evaluation.

    /* Anything is possible but is it worth it? */

  • RE: CREATE DATABASE doesn't have default file locations

    Chris,

    Thanks for directing my attention. While I didn't have a DefaultLog value in the registry, I added it and restarted SQL to have it fixed. I'm still not sure why...

    /* Anything is possible but is it worth it? */

  • RE: String tokenizing / splitting

    Jeff Moden posted a very nice article about CSV parsing. His code was written for a max input string of 8K so if you need more, stay tuned for an...

    /* Anything is possible but is it worth it? */

  • RE: String tokenizing / splitting

    As promised, I did some testing (sorry it took this long). This was run from my laptop in a Win2K3 Server VM. The results showed a pretty consistent run time...

    /* Anything is possible but is it worth it? */

  • RE: String tokenizing / splitting

    Craig Sunderland (3/7/2011)


    Surely other factors like CPU, Memory and Disk Configuration could affect these timings, hence why from my tests the XML was a better fit. There probably isn't one...

    /* Anything is possible but is it worth it? */

  • RE: String tokenizing / splitting

    Interesting about the varying times with smaller sets of data. I'll do some testing and see what I can find.

    /* Anything is possible but is it worth it? */

  • RE: String tokenizing / splitting

    We've found good use of the following tally table and UDF. It handles empty elements and works fast for us. We've done large and small sets against it.

    CREATE TABLE...

    /* Anything is possible but is it worth it? */

  • RE: Column Order in an Index

    gosh (11/24/2010)


    I have to admit that I am not impressed with the title. It is wrong. According to your article, the column order in a composite index is not important.

    Go...

    /* Anything is possible but is it worth it? */

  • RE: Column Order in an Index

    cengland0 (11/23/2010)


    Doh, I just discovered the maximum key length is 900 bytes so combining two VARCHAR(500) columns into one index results in a warning:

    The maximum key length is 900 bytes....

    /* Anything is possible but is it worth it? */

  • RE: Sending multiple rows to the Database from an Application: Part I

    I'm finishing up on a re-write of our import process. We import millions of rows through a Visual FoxPro app from the employee's computer. It can import CSV, fixed length,...

    /* Anything is possible but is it worth it? */

  • RE: remove the 'in use' property from the .mdf and .ldf files without needing to stop the mssql service?

    It sounds like you're trying to make backups of your DB by using a simple file copy and paste. I wouldn't recommend you rely on that kind of backup unless...

    /* Anything is possible but is it worth it? */

Viewing 15 posts - 16 through 30 (of 57 total)