Forum Replies Created

Viewing 15 posts - 2,101 through 2,115 (of 3,481 total)

  • RE: rolling 12 months

    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...

  • RE: Matrix report: Link column query to row query

    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...

  • RE: Matrix report: Link column query to row query

    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...

  • RE: SWITCH

    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.

  • RE: New to SRSS

    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 &...

  • RE: ssrs 2008 dataset issue

    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...

  • RE: ssrs 2008 dataset issue

    Why not just delete and recreate the dataset?

  • RE: Joining 2 Tables with Or condition

    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. ...

  • RE: Joining 2 Tables with Or condition

    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.

  • RE: Improving string comparisons that use like

    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...

  • RE: Table Creation - Tool

    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...

  • RE: Get count of events for each day between 2 dates

    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...

  • RE: Get count of events for each day between 2 dates

    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...

  • RE: Month and year from yesterday's date help

    I would start with Lynn Pettis' article[/url] on common date routines. Post back if you're still stuck.

  • RE: Row Count of Group

    How about

    =RowNumber("Customer")

    It resets every time the Customer value changes.

Viewing 15 posts - 2,101 through 2,115 (of 3,481 total)