Viewing 15 posts - 1,306 through 1,320 (of 59,066 total)
Improving database design can have a significant impact on the speed of SQL queries. Here are some tips to optimize your database design and enhance query performance:
--Jeff Moden
Change is inevitable... Change for the better is not.
July 12, 2023 at 9:07 pm
I don't know who marked that last post as spam but, I agree with it. I got a copy of the post and it was pretty obvious that someone was...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 12, 2023 at 7:24 pm
Thanks, Jackie!
--Jeff Moden
Change is inevitable... Change for the better is not.
July 11, 2023 at 7:27 pm
Yes, I don't think I looked at ratbak's answer. Too often I just type an answer without reading the previous responses.
Got it. I've had the same problem in the...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 11, 2023 at 3:04 pm
For what it's worth, I agree... those "presence with no content" posts (as Eirikur has si very appropriately labeled them) are an abuse of both AI chatbots and this site.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 11, 2023 at 2:53 pm
Ah... I see my confusion here. The op posted a recursive CTE where he said it wouldn't work with the word RECURSIVE and Frederico said that RECURSIVE is not an...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 10, 2023 at 9:06 pm
I think you might want a recursive common table expression.
Something like this:
DECLARE @n int = 3;
WITH Factorial(F,n) AS
(
SELECT 1 ...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 10, 2023 at 8:46 pm
You can also check for databases in Pseudo Full Recovery and force a full or differential backup:
... sys.database_recovery_status ...
Heh... lordy. I can't believe how long I've been at this...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 10, 2023 at 7:37 pm
I've come up with nothing in my searches, as well. Hopefully, someone will see this bit of a bump and know.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 10, 2023 at 3:03 pm
Ok. Here's an iTVF that will do the trick for you in which ever way you might want to solve your problem. As with most things, the details are in...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 10, 2023 at 12:45 am
It would appear that a simple definition of what you want is as follows:
Return the last weekday of the month (regardless of any holidays).
To help others understand that,...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 9, 2023 at 7:07 pm
Nice.... you don't even need the CTE with that method.
SELECT
Customername
,PATINDEX('%[ ][a-zA-Z]%', c.CustomerName) - PATINDEX('%[a-zA-z][ ]%', c.CustomerName) CountSpaces
FROM #CustomerData c
--Jeff Moden
Change is inevitable... Change for the better is not.
July 6, 2023 at 4:24 am
Just curious - but if you had to transfer PII/PCI/PHI for a conversion (for example) where the unencrypted data is required by the receiving party, how would...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 5, 2023 at 7:04 pm
In Microsoft SQL, you can find the spaces between the first and last name using various string manipulation functions. One approach is to use the CHARINDEX function, which returns...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 5, 2023 at 7:00 pm
You are making a lot of assumptions here that are incorrect.
Nope. Not making any assumptions here. I know and stated exactly what I'd do. People that do otherwise...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 5, 2023 at 6:57 pm
Viewing 15 posts - 1,306 through 1,320 (of 59,066 total)