Viewing 15 posts - 3,331 through 3,345 (of 3,475 total)
DECLARE @Count INT
SELECT * FROM MyTABLE WHERE...;
SET @Count = @@ROWCOUNT;
IF @Count>0
BEGIN
-- call SendDBMail or whatever you want and e-mail the report.
END
August 20, 2013 at 8:51 pm
Did you try using JOIN()?
=JOIN(Parameters!prmMultiValuedParam.Value,", ") & " " & Parameters!prmNonMultiValuedParam.Value
Use JOIN for the parameters that allow multiple values and then just
Parameters!ParamName
for the rest.
August 19, 2013 at 10:34 pm
LOL... I wish it only took coffee to wake me up.
The graph works. Might not be the best T-SQL to get me there, but it gets the job done....
August 19, 2013 at 11:30 am
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
Viewing 15 posts - 3,331 through 3,345 (of 3,475 total)