Viewing 15 posts - 301 through 315 (of 1,470 total)
Just a thought ...
What about an exclusion table (or set of tables) that you can populate per customer. Then modify your queries to exclude data based on the config table.
As...
December 24, 2020 at 8:20 pm
Thanks for the suggestions. I am still curious to know why the MERGE statement deadlocks though. Any ideas?
Here is a page with a long list of known issues with...
November 17, 2020 at 9:52 am
On my SQL 2019 instance, the behaviour does not match your explanation

November 3, 2020 at 6:21 am
This should get you going in the right direction
;WITH cteBase AS (
SELECT TABLE1.ID, TABLE2.Processingnumber
, rn = ROW_NUMBER() OVER (PARTITION BY TABLE1.ID...
October 29, 2020 at 3:02 pm
The following code will not divide the values exactly. But since you have a large number of records, it uses the card number to split the records. It will guarantee...
October 27, 2020 at 3:44 pm
I believe that you are looking for fuzzy matches. I have never had to do it before, but this looks like it might get you started
October 26, 2020 at 3:27 pm
You can take this further and split the rows into columns like this
DECLARE @XMLData xml;
SET @XMLData = '<PlaceDescriptions>
<descriptions>0|Home</descriptions>
<descriptions>1|Office|False</descriptions>
<descriptions>2|Play Ground</descriptions>
<descriptions>3|School|True</descriptions>
<descriptions>4|Movie Hall</descriptions>
</PlaceDescriptions>';
WITH cteXML AS (
SELECT descriptions...
October 25, 2020 at 5:32 am
Firstly, you don't need to use sp_xml_preparedocument and OPENXML.
Secondly, your xml is not properly formed - There is an extra ">" before "</PlaceDescriptions>"
Below is code that will extract the descriptions...
October 25, 2020 at 5:09 am
I love the use of math to solve this. However, I am stumped as to why/how the math works. An explanation for Dummies would be greatly appreciated.
y /7...
October 22, 2020 at 8:25 am
I love the use of math to solve this. However, I am stumped as to why/how the math works. An explanation for Dummies would be greatly appreciated.
y /7 -- Full...
October 21, 2020 at 7:40 am
You will need to test, but using PATINDEX *might* give you slightly better performance.
SELECT T1.DocumentNo, T2.LongSentence
FROM Table2 T2
INNER JOIN Table1 T1 ON PATINDEX('%' + T1.DocumentNo + '%',...
October 20, 2020 at 4:39 am
Since your query is returning no results, it cannot display a yes/no answer.
What you need to do is change it so that it always returns a result
SELECT...
October 19, 2020 at 8:43 am
Looks like you are missing a closing quote in the WHEN part of your case statement.
October 19, 2020 at 8:11 am
Here's my version, also no recursion, with added alias names for more clarity:
SELECT
start_date, end_date,
full_weeks * 2 +
...
October 16, 2020 at 3:33 pm
Viewing 15 posts - 301 through 315 (of 1,470 total)