757 reputation
1619
bio website
location
age
visits member for 3 years, 5 months
seen 18 hours ago

Aug
24
comment How do you roll up header-level values on a fact table with line-item granularity?
The query makes sense. But does this mean that the roll up can only occur within a view of some sort? If you were to take the fact table and build a cube from it, it seems like the customer wouldn't be able to do these roll ups in a pivot table.
Aug
24
revised How do you roll up header-level values on a fact table with line-item granularity?
added 141 characters in body
Aug
24
comment How do you roll up header-level values on a fact table with line-item granularity?
@Jamie: But if I want to do a browse query on the Product dimension (say, all Products who fall under a certain brand), this design means I'll need to somehow filter out all my "magic" products. Is that also correct? It seems like the problem can be solved by having two fact tables: one for header level and one for line-item level. But nobody seems to recommend this.
Aug
24
comment How do you roll up header-level values on a fact table with line-item granularity?
Would the "magic" Shipping product be a placeholder so that a line item with 0 quantity and 0 order amount could exist with the shipping amount? Does this mean you would then zero out the Shipping amount on the other line items?
Aug
24
asked How do you roll up header-level values on a fact table with line-item granularity?
Aug
21
revised Commonly Used Acronyms by Database Administrators
Added DRI - Declarative Referential Integrity
Aug
12
revised Is there a performance benefit to placing transaction log files on a separate drive?
deleted 2 characters in body
Aug
7
comment Filtering data ordered by rowversion
How does the date field fit in? Can a row with a particular ID and Date be updated in the table? And if so, is the date also updated (like an additional timestamp?)
Aug
2
comment How to break out of error loop in transactional replication?
I agree. For the future, I've modified the replication procedures so the error is logged. But the agent's attempt to "keep trying" seems like the equivalent of a service broker poison message. I don't see what is gained from not stopping the service.
Aug
2
answered How to break out of error loop in transactional replication?
Aug
1
asked How to break out of error loop in transactional replication?
Jul
23
revised SQL Server has encountered 1 occurrence(s) of cachestore flush
added 4 characters in body
Jul
23
answered SQL Server has encountered 1 occurrence(s) of cachestore flush
Jul
11
answered Reorganize Indexes T-SQL
Jun
29
accepted How does SQL Server choose an index key for a foreign key reference?
Jun
29
revised How does SQL Server choose an index key for a foreign key reference?
deleted 36 characters in body
Jun
29
comment How does SQL Server choose an index key for a foreign key reference?
@AaronBertrand: here's why I was asking if it was a bug: on SQL Server 2005, the behavior always chooses the primary key. On 2008, it chooses the primary key the first time if the primary key if the primary key is clustered. The behavior appears consistent, which is why it seems weird. But from what you're saying, it sounds like nobody but the programmers will ever know.
Jun
29
comment How does SQL Server choose an index key for a foreign key reference?
It makes sense...but the behavior is only on SQL Server 2008 R2 (not 2005, it's a complicated mess how I know all this), so I'm still leaning towards "potential bug."
Jun
29
comment How does SQL Server choose an index key for a foreign key reference?
I may not be understanding, but if I create primary key on the table as a clustered index in the example above, it will not use the duplicate index key as a reference (and the duplicate can be deleted). This appears to be related to it being a heap first...
Jun
29
asked How does SQL Server choose an index key for a foreign key reference?