Forum Replies Created

Viewing 15 posts - 106 through 120 (of 4,080 total)

  • RE: Parse string based on a list of values

    One more variation:


    select #t.*
            , case when right(Disposition,nullif(charindex(space(1),reverse(disposition)),0)-1)
                        in ('CH', 'HC', 'MA', 'NH', 'OA', 'OTH', 'PSY', 'SNF')
                     then right(Disposition,nullif(charindex(space(1),reverse(disposition)),0)-1) end as ShortCode
    into #r2

  • RE: CAST with NUMERIC(12,2) using INT variables

    Eirikur Eiriksson - Monday, March 11, 2019 2:16 PM

    Jeff Moden - Monday, March 11, 2019 1:13 PM

  • RE: select by "pattern"

    You were quicker, Drew.
    ---------------------------------------------------
    -- helpful index
    -- create unique nonclustered index IX1_EventStream on demoevents.EventStream(customer,id) include (eventname);

    WITH cte1 as ( -- flag prior actions
                    select id,...

  • RE: Using SQL to update and add records to a database within Excel

    First import your spreadsheet into a staging table in your database.    Then run a MERGE statement to add/update rows in your target table.    Both of these steps are well-documented.      

  • RE: Is there a possibility to have a full outer join in SSRS datasets?

    Since you apparently have a product limitation against full outer joins, you could try creating a view that does the full outer join for you and then report against the...

  • RE: The Basics of iTVFs

    n.dreyer - Monday, January 14, 2019 2:24 AM

    Thank you for all the replies,

    So to summarize, I should have a look at my...

  • RE: The SQL Server LAG Function

    Nice read, Mike.   Short, clear, and concise.    Supported by execution plans and time/io stats.    This is what I like to see even though I've used lag() for years. ...

  • RE: The Basics of iTVFs

    Jeff Moden - Saturday, January 12, 2019 7:13 AM

    The only thing that I don't agree with is the part where a function...

  • RE: The Basics of iTVFs

    Jeff Moden - Thursday, January 10, 2019 10:10 PM

    I guess I don't know what you mean.  iTVFs will use the indexes...

  • RE: The Basics of iTVFs

    Jeff Moden - Thursday, January 10, 2019 8:32 AM

    n.dreyer - Thursday, January 10, 2019 7:19 AM

    January 10, 2019 at 2:56 pm

    #2018637

  • RE: The Basics of iTVFs

    Good read, Steve.   Quick, clean, accurate, and on point.

    One thing worth mentioning when using APPLY with a table valued function is the difference between CROSS APPLY and OUTER...

  • RE: Are the posted questions getting worse?

    Looks tasty, if imperfect, to me, Steve.     Needs a big scoop of vanilla bean ice cream to go with. 🙂

  • RE: Are the posted questions getting worse?

    Talk to me about perfection when we can compute pi exactly (in anything other than Base pi).    Reality is fuzzy 😉

  • RE: Today's Random Word!

    Ears

  • RE: Best way to perform calculation stored as varchar

    Some questions:

    Can you use EXEC?   In other words, is all dynamic SQL off-limits or is the prohibition only against sp_ExecuteSQL?    
    (Yes, yes, I know:   That would make no sense.)  ...

Viewing 15 posts - 106 through 120 (of 4,080 total)