Forum Replies Created

Viewing 15 posts - 7,216 through 7,230 (of 7,608 total)

  • RE: linked database opinion?

    patrickmcginnis59 (9/13/2012)

    The approach of applications having their own databases is probably the norm

    Perhaps, perhaps not. But is that a good way to do it, regardless of how common it...

  • RE: What is Proper Steps to Remove FileGroups

    You can use this to check for files that still exist in a given filegroup(s):

    SELECT

    FILEGROUP_NAME(a.data_space_id) AS File_Group,

    OBJECT_NAME(p.object_id) AS Table_Name,

    ...

  • RE: Data Comparison

    SELECT

    Item,

    MAX(CASE WHEN [Group ID] = @group1 THEN Permission ELSE '' END) AS Group1_Permission,

    MAX(CASE WHEN [Group ID] =...

  • RE: T-SQL Help Needed

    Lynn Pettis (9/13/2012)


    ScottPletcher (9/13/2012)


    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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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"....

  • 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.

  • 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...

  • RE: Indexes Clarification

    GilaMonster (9/12/2012)


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

    Quite true.

  • 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...

  • 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...

  • 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...

Viewing 15 posts - 7,216 through 7,230 (of 7,608 total)