Viewing 15 posts - 1,291 through 1,305 (of 59,061 total)
I think you might want a recursive common table expression.
Something like this:
DECLARE @n int = 3;
WITH Factorial(F,n) AS
(
SELECT 1 ...
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...
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.
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...
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,...
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
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...
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...
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...
July 5, 2023 at 6:57 pm
Also, never use SET STATSTICS if the code involves ANY Scalar UDF. It'll make the code look a serious amount slower than it actually is. Please see the following article...
July 5, 2023 at 1:12 pm
This will make some people get all scratchy but I use SQL Profiler... usually with a SPID filter.
July 5, 2023 at 6:59 am
Heh... you're seriously going to export SSNs to a file in an unencrypted manner along with all that nice PII. What company did you say you work for?
Just...
July 5, 2023 at 6:41 am
Heh... you're seriously going to export SSNs to a file in an unencrypted manner along with all that nice PII. What company did you say you work for?
July 3, 2023 at 11:32 pm
One comment: I hope the example table isn't an exact replica of your production table, because to use that many columns defined as nvarchar(max) just to be on the...
July 3, 2023 at 6:31 pm
Hi
I have resolved the issue and doesn't need your comment or answer. Your comment is too late.
You just got done saying "I tried your suggestion and I have...
July 3, 2023 at 6:26 pm
Viewing 15 posts - 1,291 through 1,305 (of 59,061 total)