Forum Replies Created

Viewing 15 posts - 3,991 through 4,005 (of 4,085 total)

  • RE: Using MAX function when grouping on multiple fields

    Since you didn't follow etiquette by providing DDL and insert scripts for your sample, I used the AdventureWorks database. If you want with ties, you need to use the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Last Day of Month subscription for Shared SSRS schedule

    If you have a business that is 24/7, such as a website, no matter what time you run your reports at the end of the month, you risk missing some...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to print 1st row of one table followed by 1st row of second and so on

    John Rowan (8/27/2009)


    I did not say to not use a CTE. Its just an alternative way of coding the same solution. As far as ease-of-reading goes, they're almost...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to print 1st row of one table followed by 1st row of second and so on

    John Rowan (8/27/2009)


    And w/o the CTE:

    But that solution is essentially the same as the CTE and the CTE is so much easier to read. What do you gain by...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to print 1st row of one table followed by 1st row of second and so on

    I would modify your code to add a table number to guarantee that they are interleaved.

    WITH CTE AS

    (

    SELECT *, 1 AS tableNum, ROW_NUMBER() OVER (ORDER BY test) AS rowNum FROM...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: select within a select - how to address nulls

    The following works with both multiple start and stop times. It may not be the exact results you want for multiple stop times.

    WITH CTE AS

    (

    SELECT [action], [time], ROW_NUMBER() OVER...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Array Parameter using AND

    That's not how SQL logic works. SQL returns ROWS that meet the given criteria, but your criteria isn't satisfied by a single row. You would need multiple rows...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: MDX Date ranges

    I used AdventureworksDW, which only has four fiscal years of data, so I had to cheat on some of the numbers, but here is what I did. There may...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Select Query to comma seperated string.

    David's solution is correct given the sample formats, but if the formatting is not consistent, you can modify it slightly to give the correct results. For example where there...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Condition format in SSRS

    Michelle Kraushaar (8/23/2009)


    Do you mean:

    IIF(Fields!ID4.Value = Fields!Three.Value and Fields!ID4.Value = Fields!Two.Value,"YELLOW","BLACK")

    pitso.maceke (8/24/2009)


    Yes, But it is not working properly. It takes the second color.

    Yes, but there is an obvious error in...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: So I decided to go with the Cursor

    I don't see why you're even using a cursor in the first place. A cursor is horribly inefficient. You're just not noticing it, because there are so few...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: difference between INNER JOIN and Corealted subquery.

    There are certainly some similarities, but there are also differences. The big difference is that a correlated subquery can generally only return one value (one row with one column)...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Proper user access in SSRS

    maxedout420 (8/19/2009)


    SELECT a,b,c

    FROM x,y,z

    WHERE

    x.id = y.id

    AND y.num = z.num

    AND u.loginid = @REPORTUSER

    First, I believe that this syntax is being deprecated in favor of using explicit JOINs.

    Try...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How-do-I test SQL Reports?

    Exactly what are you testing for? Accuracy? Efficiency? Legibility? Something else?

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Subquery with case statement

    h_maksuda (8/19/2009)


    Thanks Drew for the reply.

    I tried and it giving me Cartesian Product.

    Is your data representative of the actual data? Your data only has one value for each date...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 3,991 through 4,005 (of 4,085 total)