Viewing 15 posts - 1 through 15 (of 6,831 total)
(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!
June 23, 2022 at 5:42 pm
(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!
June 23, 2022 at 5:33 pm
(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!
June 23, 2022 at 5:25 pm
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!
June 23, 2022 at 4:42 pm
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!
June 23, 2022 at 2:17 pm
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!
June 23, 2022 at 2:17 pm
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!
June 22, 2022 at 3:11 pm
FYI, I did not look at the spreadsheet data. When I attempted to view it, it required a log in of some sort.
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!
June 22, 2022 at 3:08 pm
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!
June 22, 2022 at 2:55 pm
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!
June 21, 2022 at 6:06 pm
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!
June 21, 2022 at 6:01 pm
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!
June 21, 2022 at 5:55 pm
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!
June 21, 2022 at 3:19 pm
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!
June 21, 2022 at 2:35 pm
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!
June 21, 2022 at 2:30 pm
Viewing 15 posts - 1 through 15 (of 6,831 total)