Viewing 15 posts - 106 through 120 (of 4,080 total)
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
March 15, 2019 at 4:08 pm
March 15, 2019 at 3:06 pm
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,...
March 15, 2019 at 2:41 pm
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.
March 4, 2019 at 1:42 pm
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...
February 27, 2019 at 3:02 pm
So to summarize, I should have a look at my...
January 14, 2019 at 9:56 am
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. ...
January 14, 2019 at 9:33 am
January 12, 2019 at 10:54 pm
I guess I don't know what you mean. iTVFs will use the indexes...
January 11, 2019 at 8:31 pm
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...
January 10, 2019 at 2:51 pm
Looks tasty, if imperfect, to me, Steve. Needs a big scoop of vanilla bean ice cream to go with. 🙂
August 23, 2018 at 12:28 pm
Talk to me about perfection when we can compute pi exactly (in anything other than Base pi). Reality is fuzzy 😉
August 21, 2018 at 1:55 pm
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.) ...
April 9, 2018 at 2:56 pm
Viewing 15 posts - 106 through 120 (of 4,080 total)