Viewing 15 posts - 16 through 30 (of 2,458 total)
You can create your own INSTR function leveraging ngrams8k.
CREATE OR ALTER FUNCTION dbo.Instr8K
(
@string VARCHAR(8000),
@search VARCHAR(100),
@instance INT
)
/*
Created by...
-- Itzik Ben-Gan 2001
April 6, 2021 at 4:43 pm
For cleaner code you can leverage fnTally. Since fnTally leverages TOP, you can exploit row goals as Steve Collins mentioned above.
CREATE OR ALTER FUNCTION dbo.getYears(@year...
-- Itzik Ben-Gan 2001
February 18, 2021 at 6:40 pm
I don't have a server handy at the moment but what you are looking for is in the REPORTSERVER.DBO.CATALOG
This has the RDL XML (Report Definitions) which you can query. To...
-- Itzik Ben-Gan 2001
January 22, 2021 at 3:36 pm
@ Alan,
I'm honestly a little bit surprised that you're justifying a sort because it has a low row count. We know how that usually works out.
I was a little rushed...
-- Itzik Ben-Gan 2001
December 27, 2020 at 8:17 pm
apart from the performance that is likely to be quite bad has errors on its construct
The Construct is a problem but I suspect the performance should be fine, STRING_SPLIT is...
-- Itzik Ben-Gan 2001
December 26, 2020 at 1:21 am
there is currently no way to incrementally populate the table.
... a [Huge] fact table that gets regenerated nightly
This is a design/process issue more than a technical one. I'll put my...
-- Itzik Ben-Gan 2001
December 8, 2020 at 6:28 pm
A couple things to consider. First, In SSMS 2019 the actual execution plan will show you how much time each portion of the query took. You don't need that here...
-- Itzik Ben-Gan 2001
November 17, 2020 at 6:46 pm
Grab a copy of PatReplace8K and it should be easy to strip out what you need.
SELECT
pa.*,
Clean1 = CAST(ISNULL(pr.newString,0) AS FLOAT),
...
-- Itzik Ben-Gan 2001
November 17, 2020 at 6:20 pm
What you posted is similar to my first version of this except that I use my ngrams function to generate the tally table. Here's a simplified version of...
-- Itzik Ben-Gan 2001
August 4, 2020 at 3:41 am
Agreed. I said similar in this post from above...
I missed this.
The difference is that I did the split using an indexed view. This way the split only happens once,...
-- Itzik Ben-Gan 2001
August 3, 2020 at 6:46 pm
Just as a side note, depending on how often your columns are updated/modified, you can always split the string ahead of time using a permanent tally table like...
-- Itzik Ben-Gan 2001
August 3, 2020 at 6:38 pm
Just as a side note, depending on how often your columns are updated/modified, you can always split the string ahead of time using a permanent tally table like this:
-- Itzik Ben-Gan 2001
August 3, 2020 at 1:51 am
I'm not seeing any code attached to your last post. What code are you talking about being "attached"?

Grrr...
/*********************************** PART #1...
-- Itzik Ben-Gan 2001
August 1, 2020 at 1:51 am
UPDATED 20200803 at 9:30PM
Ok, 4 1/2 years later I have a something really good to show!
This code is from one of many articles in various phases of completion which I'll...
-- Itzik Ben-Gan 2001
July 31, 2020 at 7:35 pm
Great article Steve. Really informative.
-- Itzik Ben-Gan 2001
July 27, 2020 at 4:34 pm
Viewing 15 posts - 16 through 30 (of 2,458 total)