Forum Replies Created

Viewing 15 posts - 7,231 through 7,245 (of 7,619 total)

  • RE: T-SQL Help Needed

    but if you are creating a table of product groups (<'BK','Books'>,<'SH','Shoes'>,<'BG','Bags'>) etc.. I would put an ID field on that and use that instead, otherwise if someone decides they need...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: T-SQL Help Needed

    A company I worked for produces clothing catalogues. Each catalogue has a 2 character reference. They produce about 130 catalogues/adverts a year, but not all letters get used...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: T-SQL Help Needed

    Eugene Elutin (9/12/2012)


    Greg Snidow (9/12/2012)


    Jeff Moden (9/12/2012)


    Greg Snidow (9/11/2012)


    The 'id' column in every table was a bit annoying to work with.

    It's even more annoying when you need it and it's...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: UniqueIdentifier as a Primary Key

    Sean Lange (9/13/2012)


    ChrisM@Work (9/13/2012)


    ScottPletcher (9/12/2012)


    There is NO case where I would ever want to use a GUID as a clustered key column.

    It would have to be THE ONLY WAY POSSIBLE...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Puzzle : Generating two unique numbers from an array of numbers (repetation not allowed)

    I think maybe you can save a little overhead by checking for the known difference expected in the result, naturally including the next-higher value as well to allow for "borrowing"....

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Cannot open user default database. Login failed.

    1. What does the GroupID column in profiler mean ?

    GroupID as classified by the Resource Governor for the current session.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: UniqueIdentifier as a Primary Key

    There is NO case where I would ever want to use a GUID as a clustered key column.

    It would have to be THE ONLY WAY POSSIBLE for me to consider...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Indexes Clarification

    GilaMonster (9/12/2012)


    Well, both of those statements are incorrect, so probably better to just ignore them...

    Quite true.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Check that a specific Group By condition does not exist

    Lynn Pettis (9/11/2012)


    Just a quick test using 6 million rows:

    Lynn's method:

    Elapsed Time (ms) 8276

    ScottPletcher's first method:

    Warning: Null value is eliminated by an aggregate or other SET operation.

    Elapsed Time...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Importing only rows with column data in specific columns.

    Lynn Pettis (9/10/2012)


    ScottPletcher (9/10/2012)


    Lynn Pettis (9/10/2012)


    ScottPletcher (9/10/2012)


    Greg Snidow (9/10/2012)


    ScottPletcher (9/10/2012)


    The UNPIVOT (one table scan) looks much better to me than fully scanning the table once for every grade column.

    Yep, as...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Importing only rows with column data in specific columns.

    Lynn Pettis (9/10/2012)


    ScottPletcher (9/10/2012)


    Greg Snidow (9/10/2012)


    ScottPletcher (9/10/2012)


    The UNPIVOT (one table scan) looks much better to me than fully scanning the table once for every grade column.

    Yep, as I said, I...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Importing only rows with column data in specific columns.

    Greg Snidow (9/10/2012)


    ScottPletcher (9/10/2012)


    The UNPIVOT (one table scan) looks much better to me than fully scanning the table once for every grade column.

    Yep, as I said, I put that out...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Check that a specific Group By condition does not exist

    Lynn Pettis (9/7/2012)


    The real test will be against a 1,000,000 (or so) table. I will try and set up such a test tonight at home. One of the...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Importing only rows with column data in specific columns.

    The UNPIVOT (one table scan) looks much better to me than fully scanning the table once for every grade column.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Datatype truncation

    If you want precise control over shortening the results returned from a float column, there is always the ROUND() function.

    If you want precise values, just use decimal to begin with....

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 7,231 through 7,245 (of 7,619 total)