Forum Replies Created

Viewing 15 posts - 1,756 through 1,770 (of 4,085 total)

  • RE: Help with SELECT STUFF and FOR XML to include Carriage Return for Null records

    The following approach is better, because there are other characters that may be entitized in XML and this approach will handle all of them in a single step.

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Query using a view as a subquery is failing to apply correct criteria

    One way to get around this is to ensure that you never divide by zero by making any zero denominator NULL.

    SELECT a, b, c, cost/NULLIF(vol,0) as...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Select first row that changed

    The approach using MIN will work with the sample data, but it's not clear that it will work with more complicated data.  Specifically, depending on the needs of the OP,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to create cascading parameter at server side?

    We would need the information about the dataset used under the Parameters tab.  That's where the problem is, and we don't enough information to tell you what is wrong with...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Is work just work?

    Eric M Russell - Thursday, March 30, 2017 1:46 PM

    Lynn Pettis - Thursday, March 30, 2017 1:02...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Is work just work?

    For me, the biggest issue is work/life balance.  I love my work, but feel that I don't have enough time to devote to the other things, particular dancing.  I would...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to create cascading parameter at server side?

    First, the purpose of cascading parameters is to simplify reporting by tailoring possible responses based on previous responses.  The key word here being responses.  The stored procedure cannot pause to...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Need database expert

    chainzown - Monday, March 27, 2017 11:30 AM

    I hope you have already found a solution, but If you still...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Convert DATETIME, trim leading zeros

    thisisfutile - Wednesday, March 29, 2017 2:26 PM

    I sure hope this isn't considered bad etiquette by reviving a 5 year old thread...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Modify Check constraint

    HelgaK - Monday, March 27, 2017 3:42 PM

    I recently read an article CHECK constraints in SQl Server http://codingsight.com/check-constraints-in-sql-server/ . may be it...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Select only the specific number of newer dates from table

    TOP(n) WITH TIES is closer to RANK() rather than DENSE_RANK().  This is the reason that both queries that use TOP(n) WITH TIES don't give the desired results.  To see this,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Select only the specific number of newer dates from table

    Use a CTE with DENSE_RANK().

    ;
    WITH mytable_dr AS
    (
        SELECT account_id, event_time, [sign],
            DENSE_RANK() OVER(ORDER BY CAST(event_time AS DATE) DESC) AS dr
        FROM #mytable
    )
    SELECT...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: SSMS Tips - Text Results

    n.ryan - Tuesday, March 28, 2017 2:12 AM

    Or more commonly "the shortcut you least expected and now can't remember how to undo...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Are the posted questions getting worse?

    BrainDonor - Tuesday, March 28, 2017 1:46 AM

    drew.allen - Monday, March 27, 2017 10:17 AM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Are the posted questions getting worse?

    Now that I'm officially unemployed, I finally got around to downloading SQL 2016 developer edition to play around with.  Right now, the two most frustrating things are that they changed...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 1,756 through 1,770 (of 4,085 total)