Viewing 15 posts - 1 through 15 (of 2,456 total)
Alan... you might want to explain what the bernieML.samd. stuff is.
Thanks Jeff - I fixed my code. I was using my own DB and forgot to remove the...
October 31, 2024 at 3:59 pm
UPDATED 10/31/2024
The was an error in my code, I just changed "bernieML.samd.ngrams8K" to "dbo.ngrams8K". I was using code from my own DB (BernieML) with a different schema (samd).
October 30, 2024 at 9:09 pm
There's always MS Data Quality Services (DQS). It allows for data cleansing, matching, de-duplication and an array of related data quality services. It's not easy to use but does...
October 30, 2024 at 7:30 pm
For this you can use a "splitter" (AKA "tokenizer" function.)
DECLARE @String VARCHAR(8000) = 'Hello world. #1234 has been replaced by #014521';
SELECT SomeNbr = REPLACE(split.[value],'#','')
FROM STRING_SPLIT(@String,' ') AS...
October 24, 2024 at 5:36 pm
Post got submitted twice. Sorry.
October 24, 2024 at 5:36 pm
Another problem I’ve seen frequently is the overuse of user-defined functions (UDFs), especially nesting scalar UDFs.
scalar UDFs, nested or not, tend to burn the house down. When used in a...
January 17, 2022 at 2:57 pm
Glen - I love this article. Amazing stuff. I read some of it and skimmed the rest but can't wait until I have time to play with your code a...
September 7, 2021 at 3:29 pm
Thanks for the replies and sorry for being a Ghost OP.
To me, the above makes sense based on the wording of those metrics and is useful information. Does the above...
July 7, 2021 at 9:29 pm
Adi did it like I would. His excellent solution could be simplified as
SELECT t.FamilyID, t.PortionKey, t.GroupID, GeneratorNumber =
...
June 9, 2021 at 12:13 am
I would write it using EXISTS instead of INs. It's easier if you use table aliases.
I always use EXISTS instead of IN. Best case - it performs better, worse case...
June 8, 2021 at 11:50 pm
Note that the "./" in your code is not required based on the XML Context. Also note that specifying that you need the elements' text, via text(), will improve performance.
For...
May 4, 2021 at 3:29 pm
To better understand the problem and solution have a look at Well Formed XML:
April 23, 2021 at 5:03 pm
This is my first time messing with JSON in SQL. The BOL entry on this helped me.
First, JSON is cases sensitive so, $.Data is not the same as $.data. Next,...
April 15, 2021 at 1:49 pm
As Jeff mentioned, CONVERT + 101 gets you the formatting you need:
SELECT CONVERT(VARCHAR(10), GETDATE(), 101);
For the last day of the previous month:
SELECT EOMONTH(DATEADD(MONTH,-1,GETDATE()));
For the...
April 14, 2021 at 10:04 pm
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...
April 6, 2021 at 4:43 pm
Viewing 15 posts - 1 through 15 (of 2,456 total)