Viewing 15 posts - 706 through 720 (of 4,087 total)
January 22, 2019 at 2:46 pm
I dont know what table tally is.
You will after reading this: The...
January 18, 2019 at 10:12 am
This seems to perform much better, because it doesn't require an expensive SORT operation. It also uses the documented (and supported) XML concatenation over using the undocumented (and unsupported) quirky...
January 18, 2019 at 10:01 am
I came up with my best guess at what they are asking for. Here it is:
; WITH SubCategoryDistribution AS
(
SELECT ParentCategory, CategorySubGroupCode, SUM(Inventory)/SUM(SUM(Inventory))...
January 18, 2019 at 9:28 am
You're much more likely to get help if you supply consumable data. (See the first link in my signature.)
You should also look up Packing Intervals by Itzik...
January 18, 2019 at 9:01 am
January 18, 2019 at 8:01 am
January 17, 2019 at 8:58 am
Yes, you can. You want to use a CROSS APPLY with a TOP clause and use a CASE expression in the TOP clause. Post table definitions and sample data, and someone...
January 16, 2019 at 3:59 pm
You should avoid using functions on columns in WHERE and ON clauses and your fiscal_year is actually shorthand for a function on a column, so you should rewrite your WHERE...
January 16, 2019 at 3:17 pm
January 16, 2019 at 1:17 pm
You'll also need to use a CTE or derived table, because you have aggregates on two different scales. You'll first need to count the number of trips per day, and...
January 15, 2019 at 3:27 pm
January 15, 2019 at 2:56 pm
Viewing 15 posts - 706 through 720 (of 4,087 total)