Viewing 15 posts - 3,256 through 3,270 (of 3,396 total)
Getting closer, I think.... really should have heeded my professor's advice and used a smaller dataset, but anyway! I think this is right
SELECT ProtocolNo
, WeekNumber
, Goal
-- ADD RTGoal here
,...
August 18, 2013 at 4:31 pm
Easy button! <CLICK!> Thanks, Jeff!
For other poor noobs like me, here's at least the first part of the running total.
SELECT ProtocolNo
, WeekNumber
, Goal
, SUM(Goal) OVER (PARTITION BY ProtocolNo...
August 18, 2013 at 12:32 pm
MM,
super cool... got it to work... now to sort out the parameter stuff!
Pieter
August 12, 2013 at 8:54 pm
I was afraid I was going to have to use that. No way to pass a parameter directly to a stored procedure through the GUI. No big surprise...
August 12, 2013 at 3:02 pm
I was going to add that viewing an entire table could be a bad idea. Imagine viewing the entire contents of a Fact table in a Data Warehouse with...
August 12, 2013 at 12:41 pm
Thanks Koen, at least now I know if I need to upgrade yet. (Apparently not!)
One sort of follow-up question... I was looking on here for how to execute...
August 12, 2013 at 12:39 pm
Use ROW_NUMBER().
This is close, but not quite right...
WITH SomeNumbers AS
(
SELECT c1, c2,
ROW_NUMBER() OVER (ORDER BY c1) AS RowNumber
FROM #t1
)
SELECT x.c1
, x.c2
, x.PrevC2
, x.c2-COALESCE(x.PrevC2,0) AS Delta
FROM (SELECT s1.c1
, s1.c2
--, s1.RowNumber
--, s2.c1...
August 10, 2013 at 7:34 pm
Okay, got it finally. Thanks!
The trick that I wasn't seeing was that you can't filter on the column with the multi-valued parameter in the stored procedure, you have to...
August 9, 2013 at 7:08 pm
Koen Verbeeck (8/9/2013)
You need to...
August 9, 2013 at 1:05 am
Chris,
thanks for the examples. I'm going to read up more and see if I can get my head around Paul White's articles on CROSS and OUTER APPLY and...
July 30, 2013 at 1:56 pm
Select ISNULL(Value, 'Not Defined') as Value
from #mytable
UNION
Select Value AS Value
FROM #mytable
Order by Value
How about
SELECT ISNULL(Value, 'Not Defined') AS Value, 0 As SortOrder'
FROM #mytable
UNION
SELECT Value, 1
FROM #mytable
ORDER BY Value, SortOrder
July 22, 2013 at 9:49 am
Reading Kimball's book on Data Warehousing isn't a bad place to start. It's a great introduction to the concepts in DW design and modeling. But it's definitely true...
July 22, 2013 at 9:46 am
I did it with a Matrix report.
Row: ProductDate
Column: PersonName
Intersection (value): ProductName
or did it have to be in query?
July 12, 2013 at 9:52 am
I think that will work. I knew I had to be making it waaay harder than it really was.
Thanks!
July 9, 2013 at 8:23 pm
Viewing 15 posts - 3,256 through 3,270 (of 3,396 total)