Forum Replies Created

Viewing 15 posts - 1 through 15 (of 6,831 total)

  • Reply To: Clarification on the database design process

    (6) A view is a customized set of columns or computed values from existing tables.  The view may leave out some columns and may create new columns.  What goes in...

    SQL DBA,SQL Server MVP(07, 08, 09) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

  • Reply To: Clarification on the database design process

    (5) (A) Customers with less than "Excellent" credit rating must get approval for any order over $500 (or whatever amount) before it is processed, or pay for the order in...

    SQL DBA,SQL Server MVP(07, 08, 09) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

  • Reply To: Clarification on the database design process

    (2) "How could the way they use the database affect the data requirements?"  It doesn't really, so your skepticism is correct.  Hopefully the author just worded this somewhat awkwardly.  What...

    SQL DBA,SQL Server MVP(07, 08, 09) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

  • Reply To: How much memory is allocated when you UNION ALL?

    ZZartin wrote:

    Grant Fritchey wrote:

    Take a look at the execution plan. It's going to be all one allocation.

    UNION ALL isn't a bad performer in general. In fact, usually, you get better performance...

    SQL DBA,SQL Server MVP(07, 08, 09) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

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

    Are you saying that this query didn't work?:

    SELECT *

    FROM (

    SELECT TOP (1) vacationhours AS 'Max_VacationHours', *

    FROM [HumanResources].[Employee]

    ORDER BY vacationhours DESC

    ) AS q1

    UNION ALL

    SELECT *

    FROM (

    SELECT TOP (1) vacationhours AS 'Min_VacationHours',...

    SQL DBA,SQL Server MVP(07, 08, 09) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

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

    This query:

    Select TOP (1) 'Max Vacation Hours' as 'Vacation Hours', *

    From [HumanResources].[Employee]

    UNION ALL

    could give you any row in the table since it doesn't have an ORDER BY.

    SQL DBA,SQL Server MVP(07, 08, 09) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

  • Reply To: Query help

    I don't think there any built-in functions that would directly help with that.

    As Phil suggested, post examples and he can help you with custom code to do it.

    SQL DBA,SQL Server MVP(07, 08, 09) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

  • 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) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

  • 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) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

  • 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) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

  • 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) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

  • 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) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

  • 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) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

  • 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) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

  • 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) "Money can't buy you happiness." Maybe so, but it can make your unhappiness a LOT more comfortable!

Viewing 15 posts - 1 through 15 (of 6,831 total)