Viewing 15 posts - 2,101 through 2,115 (of 3,481 total)
If you have dates in your table, you could use something like:
SELECT *
FROM Sales.Orders
WHERE Sales.Orders.OrderDate BETWEEN DATEADD(year,-1,GETDATE()) AND GETDATE();
You probably want to add 1 to the "one year ago" stuff...
BETWEEN...
January 22, 2016 at 12:01 pm
Sorry, I should have clarified. You don't need the totals query at all. You can do the counting/totals whatever in SSRS. If you use a simple stored procedure...
January 22, 2016 at 9:56 am
Magy,
Thanks for the sample data... would be easier to consume if you did it like this or with create table/insert scripts. Just makes it easier to reproduce your problem...
January 21, 2016 at 7:42 pm
If the date field is available, you could do something like this:
FORMAT(Fields!enrollDate.Value,"MMMM")
and it will format the date as a Monthname....
1="January" etc.
January 21, 2016 at 9:55 am
Drop a Matrix (not a tablix) onto the design surface of your report.
Drag [Staff] to the row,
[ServiceType] to the column
and drop the [Duration] to the value (intersection of Row &...
January 20, 2016 at 3:54 pm
What happens if you create a stored procedure that has a different name, but is essentially the same stored procedure? Sounds like something is happening on the server we...
January 16, 2016 at 6:32 pm
Why not just delete and recreate the dataset?
January 15, 2016 at 3:51 pm
Scratch all that.
You have a basic normalization problem. If you had a single column/field in your table for e-mail address, then it would probably be a trivial question. ...
January 9, 2016 at 8:25 pm
create this query:
SELECT EmailAddress, EMail1 AS Mail1
FROM #Test_table_2
UNION ALL
SELECT EmailAddress, EMail2
FROM #Test_table_2
then join that to whatever other table you need.
Normalization is a beautiful thing.
January 9, 2016 at 6:50 pm
if you could create a column in the UserPolicy table that contains the 6 characters or whatever you're matching on in a single column (or at the column values start...
January 8, 2016 at 2:27 pm
Amen to that! the reverse engineering of ERDs etc used to be one of my favorite parts of Visio... why MS decided it was no longer useful is a...
January 8, 2016 at 11:50 am
This might be slightly off-topic, but the other auxiliary table that's super handy is a numbers table. (it can be virtual, like an iTVF) that has numbers from 1 to...
January 7, 2016 at 2:35 pm
Nothing to it. Use a Calendar Table, and then outer join it to your Events table.
SELECT c.CalendarDate, Count(e.EventID)
FROM Calendar c LEFT JOIN Events e ON c.CalendarDate = e.EventDate
WHERE c.CalendarDate>=@StartDate...
January 6, 2016 at 5:01 pm
I would start with Lynn Pettis' article[/url] on common date routines. Post back if you're still stuck.
January 6, 2016 at 9:40 am
How about
=RowNumber("Customer")
It resets every time the Customer value changes.
January 6, 2016 at 7:16 am
Viewing 15 posts - 2,101 through 2,115 (of 3,481 total)