Viewing 15 posts - 2,881 through 2,895 (of 3,489 total)
Some variation of this should work:
the fact that you're sorting by multiple columns might complicate things.
September 12, 2014 at 7:25 pm
Not the fully exploded version (I used a couple of views to simplify the later queries a little)... but that's what I was thinking originally when I suggested that LAG()...
September 11, 2014 at 8:40 pm
To add to Alexander's advice... (which is spot on, BTW)...
The major wrinkle is going to be the fact that the source tables don't all have the same number of columns....
September 11, 2014 at 7:38 pm
Jack,
I think this is close. Only Activity_Date is not in the dataset, just Month(Activity_Date) and YEAR(Activity_Date). It's somewhat of a cheat, but since the data is being partitioned...
September 11, 2014 at 7:09 pm
[SomeDateColumn]<=TODAY
September 10, 2014 at 7:34 am
what I did was to do a weird join. Say you have two CTEs, one for "Current Year" and one for "Previous Year". You can do a terrible...
September 9, 2014 at 10:19 pm
FWIW, sometimes people just don't know what an answerable question looks like (complete with sample data etc). I was sorely tempted to post a link to Jeff's article when...
September 9, 2014 at 10:03 pm
Jack,
Cool solution! After stepping away from what I was thinking before, I realized that I could use a CTE to do the thing... (and I saw you did that)....
September 9, 2014 at 6:11 pm
I got a start on the solution... hopefully this will send you in the right direction. If you have 2012, you can use LAG to compare. The only...
September 8, 2014 at 7:24 pm
Easiest way to do it is to open the report in design view. Do you not have rights to do that?
September 8, 2014 at 2:09 pm
My guess would be to create a PIVOT
This article walks you through it:
http://www.sqlservercentral.com/articles/pivot/62808/
Then once you have that, you should be able to append it to your destination table.
September 8, 2014 at 11:40 am
Can't you just publish it as a report part and reuse it that way?
September 5, 2014 at 5:27 pm
If what you're intending is to "explode" the range (say 1/1/2014 to 6/1/2014), then the easiest way is probably using an auxiliary Tally table. (Mine is called "Numbers" for...
September 4, 2014 at 12:19 pm
This worked... I changed a few field names, because they're reserved in T-SQL. Turns out this is a plain totals query.
SELECT Ticket, UserX, MIN(PriorityX)
FROM
(SELECT 'A' AS Ticket,
'ME' As...
September 3, 2014 at 1:56 pm
Before trying to build a data warehouse, I would definitely recommend reading Ralph Kimball's book. I have a really old copy of The Data Warehouse Toolkit. There are...
September 1, 2014 at 8:28 pm
Viewing 15 posts - 2,881 through 2,895 (of 3,489 total)