Forum Replies Created

Viewing 15 posts - 736 through 750 (of 1,246 total)

  • RE: Selecting all text between a distinct path

    Shabbaranks - Thursday, April 27, 2017 7:30 AM

    Thanks for the input guys its really appreciated (all be it I am a little...

  • RE: Still driving me nuts: selecting several timelines from several lines from multibale tables

    Try this... It's a liitle cumbersome and would benefit greatly from some proper indexes but it does apear to produce the desired results.

    WITH
        cte_RowsToKeep AS (
            SELECT
                c.clientid,
                c.assessment_nbr,
                c.begin_dt,
                c.end_dt,
                c.date_died,
                KeepNum = MAX(c.assessment_nbr)...

  • RE: SSRS Report Parts

    Odds are you're just making it more difficult that it needs to be. First thing about SSRS is that there is no "report header" like there is with CR...
    Before...

  • RE: MIN of NULL while pivoting

    btio_3000 - Thursday, April 20, 2017 2:48 PM

    But col1 IS nullable, right? I am still not clear 🙁

    You're using a table expression...

  • RE: MIN of NULL while pivoting

    It's using the datatype of Col1, same as it is for f1, f2 & f3.

  • RE: Displaying correct $Amount

    sgmunson - Thursday, April 20, 2017 10:48 AM

    The Latin is actually Mea Culpa...   fyi...

    Good catch... Corrected. 🙂

  • RE: Displaying correct $Amount

    drew.allen - Wednesday, April 19, 2017 1:45 PM

    Jason pointed you to the discussion on the article when he should have pointed...

  • RE: Displaying correct $Amount

    Please check out the following link...

    Forum Etiquette: How to post data/code...

  • RE: Need Help on schedule days

    Here's a slightly different way of producing the same results...

    WITH cteDays(Schedule_Days) AS (
    SELECT N FROM (VALUES (0),(1),(2),(3),(4),(5),(6)) AS X(N)
    )
    SELECT
        t.ID,

  • RE: SQL Query Help

    woody_rd - Monday, April 17, 2017 7:59 PM

    My apologies, I think I misstated what results I was looking for.  I just want...

  • RE: SQL Query Help

    woody_rd - Monday, April 17, 2017 7:43 PM

    That's exactly right.  THose are the 2 ID's I want to return.  But when I...

  • RE: SQL Query Help

    woody_rd - Monday, April 17, 2017 7:34 PM

    Well, that brings back the 3 rows that have reason.reason.  i want/need to return the...

  • RE: SQL Query Help

    Try this...

    SELECT DISTINCT
        td1.Id
    FROM
        #temp_data td1
    WHERE
        NOT EXISTS (
                SELECT 1
                FROM
                    #temp_data td2
                WHERE
                    td1.Id = td2.Id

  • RE: concatenate using dynamic SQL

    Here is a different solution that can build the string with a single pass at the table... (making it @ 1/3 the cost of the 3 pass solution).
    [code...

  • RE: Removing Reverse Duplicates

    Here's another set of options...

    IF OBJECT_ID('tempdb..#Links','U') IS NOT NULL
        DROP TABLE #Links;

    CREATE TABLE #Links (
            ClientRef INT,
            LinkedClientRef INT
        );
    -- Create the data

Viewing 15 posts - 736 through 750 (of 1,246 total)