Viewing 15 posts - 631 through 645 (of 2,648 total)
--20 seconds, new function
SELECT
B.ID,
(SELECT VALUE FROM dbo.[GetValueInLanguage2]('fr', D.XmlValue))
FROM #Big B
INNER JOIN #Dict D ON D.ID = B.DictID
--53 seconds,...
December 22, 2022 at 2:11 pm
Johnathan, thank you for your reply but that only yields two rows.
It should yield three rows as it groups by [claim ID], [Claim status] and you have (A, P),...
December 22, 2022 at 1:24 pm
SELECT [claim ID], [Claim status], MIN([Rec Start]) [Rec Start], MAX([Rec End]) [Rec End]
FROM MyTable
GROUP BY [claim ID], [Claim status]
In the "Complex" example you have...
December 22, 2022 at 12:41 pm
Hi folks,
Some words about this interesting function.
Now I call this function like this:
SELECT *FROM dbo.STRING_SPLIT(N'Lorem DO ipsum BE dolor BO sit amet, consectetur adipiscing elit', N'DO');GO
But what to do...
December 22, 2022 at 11:54 am
I've tried all those queries and they all run in about 4 seconds on my machine even the one that runs in 76 seconds on your machine.
I'm using SQL 2019...
December 22, 2022 at 12:23 am
Fascinating discussions, but what was "wrong" with my solution? I heard stuff like it is not usable except on SQL 2022, but this IS the SQL 2022 forum, is...
December 21, 2022 at 1:06 am
No, a solution like this is hopefully only on few rows - as mentioned earlier, else change the way to solve the problem. And if my solution runs in...
December 19, 2022 at 8:50 pm
And if you want the seven last?
And if your server is performing like a dog because you have implemented the most inefficient code you can think of?
December 19, 2022 at 8:32 pm
For me, the following priority is important and my priority - so we will never agree! 1. The statement returns the correct result with the current data. 2. The...
December 19, 2022 at 8:27 pm
Just as a comparison of the methods given I ran the following script for 130k rows:
-- Finding second last
DROP TABLE IF EXISTS #Tmp ;
create table #Tmp (SerialNumber...
December 19, 2022 at 6:57 pm
If the optimizer choose to use tempdb, data is not necessary read in the same order as inserted - the principle of using a heap. In this situation with...
December 19, 2022 at 4:15 pm
If the optimizer choose to use tempdb, data is not necessary read in the same order as inserted - the principle of using a heap. In this situation with...
December 19, 2022 at 1:06 pm
This is not correct! It is right that there is no sort, but no sort is not the same as data is in the same order as in the...
December 19, 2022 at 9:48 am
AC Roberts: you are making one of the classic mistakes!!! You just use a function without testing for a correct solution. ORDER BY (SELECT NULL) does not guarantee order....
December 19, 2022 at 12:21 am
Here is a solution to get the value before the last pipe symbol, it will work on SQL Server 2012 or higher using this function: https://www.sqlservercentral.com/scripts/a-varcharmax-string_split-function-for-sql-2012-and-above-2, it...
December 18, 2022 at 3:52 pm
Viewing 15 posts - 631 through 645 (of 2,648 total)