Viewing 15 posts - 3,016 through 3,030 (of 3,482 total)
You could use a UNION query and then just use NULL for the missing columns in the dataset with fewer columns. The sorting might be an issue. Hard...
May 13, 2014 at 3:07 pm
Mario,
Just wondering, but why do you have Earnings and Amount in the same column? If you separated them so that they were in separate columns, it would make dealing...
May 13, 2014 at 1:00 pm
If you have 2012, then here's an example of a running total using window functions (from Itzik Ben-Gan's book on Window functions in 2012):
SELECT empID, qty,
SUM(qty) OVER (PARTITION BY empID
...
May 11, 2014 at 3:20 pm
Maybe my brain is not working, but if you can return a set of punch in/outs for an employee, shouldn't you be able to use ROWNUMBER() to get odd (clock...
May 11, 2014 at 1:19 pm
So this was a simplified example?
If you're having trouble implementing a more complex solution, post the table info and the expected result.
May 10, 2014 at 8:41 pm
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
Viewing 15 posts - 3,016 through 3,030 (of 3,482 total)