Viewing 15 posts - 2,176 through 2,190 (of 3,481 total)
November 23, 2015 at 7:05 pm
You could use ROW_NUMBER() and maybe select the columns you need and filter by ROW_NUMBER() to put them into separate records.
Please show your desired output. (My psychic skills are...
November 23, 2015 at 5:17 pm
Crosspost... original is here:
http://www.sqlservercentral.com/Forums/Topic1739452-3077-1.aspx#bm1739455
(Should actually be in 2014).
November 23, 2015 at 5:07 pm
Could you please post your expected output?
November 23, 2015 at 5:05 pm
If you're using 2012, use LAG to get the previous record, then you can compare/do math on the two in the same row.
November 23, 2015 at 4:49 pm
The spam this weekend is insane... is the filter taking the weekend off?
November 22, 2015 at 3:52 pm
Could you explain why you need a recursive query for this? Performance of recursive queries will probably be really slow. If you have a dummy database outside of work,...
November 21, 2015 at 11:05 am
Mario,
I hope your math is wrong, because mine doesn't match what you're getting. For the moment, I'll pretend it does.
I think the whole hierarchy bit is a red herring....
November 20, 2015 at 11:06 pm
Where's the ProductID in your dataset? Either my psychic powers or my eyesight must be failing.
How did my solution not work?
November 18, 2015 at 11:23 am
maybe...
SELECT P1, MAX(P2) AS MP2, MAX(P3) AS MP3
FROM
(SELECT 35 AS P1,NULL AS P2,NULL AS P3
UNION ALL SELECT 35,NULL,290
UNION ALL SELECT 35, 659,NULL
UNION ALL SELECT 14,NULL,NULL
UNION ALL SELECT 14,NULL,296
UNION ALL SELECT...
November 18, 2015 at 10:41 am
If you have Enterprise, you can use Data Driven Subscriptions. If not, I think you can use Jason Selburg's solution.
http://www.sqlservercentral.com/scripts/Miscellaneous/31733/
November 17, 2015 at 1:13 pm
You could use RANK/DENSE RANK in your query and then create a calculated expression in SSRS.
IIf(PersonRank>5.6,PersonRank)
then just group on [PersonRank]
November 17, 2015 at 1:11 pm
Here is okay. Could you post the data as a UNION query, or CREATE TABLE query with INSERTS to make it easier for us to help? It sounds like...
November 16, 2015 at 1:37 pm
Something like this should work:
Value:
=DateDiff(DateInterval.Hour,Today(),Now())
Then you could just choose your ranges for red/yellow/green, as long as the ranges don't overlap and there's only one red/yellow/green value range per day.
November 14, 2015 at 5:16 pm
I am assuming you have a table of dates in your database or a Calendar table (basically a contiguous list of dates). Because dates are continuous, you could just...
November 14, 2015 at 5:02 pm
Viewing 15 posts - 2,176 through 2,190 (of 3,481 total)