Forum Replies Created

Viewing 15 posts - 796 through 810 (of 7,613 total)

  • Reply To: Are the data types I've chosen the best choices?

    FYI, I did not look at the spreadsheet data.  When I attempted to view it, it required a log in of some sort.

    ScottPletcher wrote:

    Are you suggesting that in 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".

  • Reply To: Are the data types I've chosen the best choices?

    Jeff Moden wrote:

    ScottPletcher wrote:

    I would strongly recommend sticking with "integer" as the type.  Add a domain (or range_of_values) property to limit the size rather than a data type name.  Remember,...

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

  • Reply To: Are the data types I've chosen the best choices?

    The main thing is:

    Do not get bogged down futzing about with specific data types during the design process!

    Those details are best left until later anyway.

    What is vital is to get...

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

  • Reply To: Are the data types I've chosen the best choices?

    Create another Attributes document that has additional info about each attribute, including its valid range of values.  This will end up being one of the most valuable documents created during...

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

  • Reply To: Are the data types I've chosen the best choices?

    Mr_X wrote:

    One thing someone said to me was that there cannot be two primary keys in a table. Is this true? if so, how can I adjust my data model...

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

  • Reply To: Are the data types I've chosen the best choices?

    Mr_X wrote:

    ScottPletcher wrote:

    I would strongly recommend sticking with "integer" as the type.  Add a domain (or range_of_values) column to limit the size rather than a data type name.  Remember, 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".

  • Reply To: Bringing all the columns not just the newly created

    SELECT *
    FROM (
    SELECT TOP (1) vacationhours AS 'Max_VacationHours', *
    FROM [HumanResources].[Employee]
    ORDER BY vacationhours DESC
    ) AS q1

    UNION...

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

  • Reply To: Are the data types I've chosen the best choices?

    My earlier comment on the model got lost (this site seems to do that sometimes with posts that go to a new page).

    Overall I think you did an excellent job...

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

  • Reply To: Reclaim space after setting varbinary(max) column to NULL

    No, unfortunately you can't use WITH TRUNCATEONLY to free the space.

    Fragmentation is possible from the SHRINK, so you'll have to check if any tables need rebuilt after you've shrunk 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".

  • Reply To: Reclaim space after setting varbinary(max) column to NULL

    That should reclaim space from that table back to the database itself.

    I think you'll still need to run SHRINKFILE to free the space the database itself back to the disk.

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

  • Reply To: Are the data types I've chosen the best choices?

    Does the system need to prevent duplicate responses to a Ticket?  That would be complex to do at the very least.

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

  • Reply To: Are the data types I've chosen the best choices?

    frederico_fonseca wrote:

    ScottPletcher wrote:

    Jeff Moden wrote:

    ScottPletcher wrote:

    Remember, too, that the logical data model should be easily understood and use by business people.  In fact, if possible, keep all developers out 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".

  • Reply To: explicite alternative to FORMAT() concerning DATE

    You could just use the 1st for the day, which would mean it was still a valid date:

    CONVERT(varchar(10), DATEADD(MONTH, DATEDIFF(MONTH, 0, Tab.date), 0), 120)

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

  • Reply To: Are the data types I've chosen the best choices?

    Jeff Moden wrote:

    ScottPletcher wrote:

    Phil Parkin wrote:

    This link gives a few reasons for choosing shorter varchar lengths.

    In terms of storage, CHAR(n) columns are always n characters long.

    VARCHAR(n) columns are anything between 2...

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

  • Reply To: Are the data types I've chosen the best choices?

    Jeff Moden wrote:

    ScottPletcher wrote:

    Remember, too, that the logical data model should be easily understood and use by business people.  In fact, if possible, keep all developers out of the first one...

    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 - 796 through 810 (of 7,613 total)