Viewing 15 posts - 3,046 through 3,060 (of 3,507 total)
Now to implement in a much more complex way. 🙂
Umm... Okay! I hope you're being facetious!
May 10, 2014 at 6:23 pm
This is close:
WITH cteList(col1, col2, freq) AS
(SELECT col1, col2, count(*) OVER (PARTITION BY col1, col2) AS Freq
FROM (
SELECT 'John' AS col1,1 as col2,1 as col3
UNION ALL
SELECT 'John',1,1
UNION ALL
SELECT 'John',2,2
UNION ALL
SELECT...
May 9, 2014 at 9:18 pm
This is the article I was thought might help:
http://www.sqlservercentral.com/scripts/Miscellaneous/31733/
May 8, 2014 at 10:57 am
What you're describing is called a data-driven subscription. What version of SQL Server are you using? Enterprise supports them natively. If not, I am pretty sure that Jason...
May 7, 2014 at 4:19 pm
Why not just use a junction table? Normally, the junction table holds the foreign keys from the two parent tables and then any information that is specific to the...
May 5, 2014 at 12:07 pm
Create a calculated column in your dataset for the year.
YEAR(SomeDate)
Then you should be able to group no problem.
May 1, 2014 at 7:47 am
Do you understand the difference between an OLTP database structure and a DW database structure? Which part are you having trouble with? The star schema?
April 29, 2014 at 3:50 pm
If you can get your hands on a copy, read a little of Ralph Kimball's Data Warehouse Toolkit
April 29, 2014 at 2:46 pm
Sorry, I completely missed this. What you describe is exactly what I ended up doing. Lots of parameterized subreports that I could include in a "main" report. ...
April 28, 2014 at 2:48 pm
I think I managed to reproduce your problem... and I think I solved it.
First off, some data to play with that I used as the data source for my report:
SELECT...
April 26, 2014 at 8:28 pm
Oh, super cool! Guess I'll have to test and see if it is happy on Win7 or another non-Server OS.
Thanks!
April 26, 2014 at 6:06 pm
Are you trying to create a single dataset to use in your report? If so, it looks like you can union the results together.
SELECT...
FROM v_SomeView
WHERE...
UNION ALL
SELECT...
FROM v_SomeOtherView
WHERE...
and then...
April 26, 2014 at 1:41 pm
If you're using a Slowly Changing Dimension, and this is classwork, you might want to read up on them in Kimball's book. He explains how to do this in...
April 26, 2014 at 1:32 pm
Probably should have done this with a CTE, but anyway, I think this works:
SELECT mx.SaleYear, mx.SaleWeek, mx.highestSale, sd.ProductID
FROM
(SELECT SaleYear
, SaleWeek
, MAX(Quantity) AS highestSale
FROM SalesData
GROUP BY SaleYear, SaleWeek) mx
INNER JOIN...
April 23, 2014 at 9:57 am
If you're using a normal database and not an SSAS cube, then you can use a Calendar table. Here's the article on it: http://www.sqlservercentral.com/articles/T-SQL/70482/
Basically, the Calendar table has a...
April 20, 2014 at 12:26 am
Viewing 15 posts - 3,046 through 3,060 (of 3,507 total)