Viewing 15 posts - 1,186 through 1,200 (of 7,614 total)
SELECT [File Name], [Created Date], MAX([File sending Date] AS [File sending Date]
FROM <your_table_name>
GROUP BY [File Name], [Created Date]
October 26, 2021 at 3:37 pm
I don't think you need PIVOT at all in this case, unless I'm not understanding correctly:
SELECT Skill, COUNT(call_id) AS counts
FROM [a2wh].[dbo].[vw_CallLogCommon_2021]
WHERE date = '2021-10-10'
GROUP BY Skill
ORDER...
October 26, 2021 at 3:35 pm
Am I wrong saying that immediatelly after the full backup, the transaction log is useless?
Yes, that is quite wrong.
The transaction log would still be needed to recover to a point-in-time...
October 25, 2021 at 9:35 pm
To review, the table definition provided by the OP
CREATE TABLE dbo.IntChange (NumericValue INT)
INSERT INTO dbo.IntChange
VALUES (15697)
,(876)
,(1452)
,(3374)
,(894)
,(84516)
You have some reason to believe the future universe of possible...
October 25, 2021 at 8:50 pm
Wow all that. Ok maybe something like this
select IcC.NumericValue,
stuff((select ''+v.repl
...
October 25, 2021 at 6:33 pm
I try not to mastermind someone else's needs for code. If they confirm it's ssns or something else critical, then that needs to change. Nothing about the ssn should be...
October 25, 2021 at 6:20 pm
In general, I say replace only those chars that you the algorithm requires you to replace, leave all others alone.
Otherwise, say 6 months from now, they decide to convert it...
October 25, 2021 at 5:58 pm
maybe something like this
select ic.NumericValue, xml_string_agg.string
from #IntChange ic
cross apply (select stuff((select ''+v.repl
...
October 25, 2021 at 5:44 pm
I do.
Similarly, if, say, I were substituting letters l and 0 to prevent ambiguity, I'd simply replace just those, not 'A' with 'A', 'B' with 'B', etc.
What about a potential...
October 25, 2021 at 5:39 pm
Your code also has zeros just disappear completely from your results. It's never explicitly stated that zeros can't appear in these numbers. Just in case they do, I...
October 25, 2021 at 5:16 pm
ScottPletcher wrote:Is that code fundamentally different than the first query I posted using the same method?
No temp table
No Cartesian product without row goal, i.e. SELECT TOP(n)
No LEFT JOIN
No ISNULL
The...
October 25, 2021 at 4:01 pm
Try different clustering for the table. If that doesn't help enough by itself, then you can also look into partitioning the table.
The key thing for determining the best clustered index...
October 25, 2021 at 3:25 pm
maybe something like this
select ic.NumericValue,
stuff((select '' + v.repl
...
October 25, 2021 at 3:09 pm
IF OBJECT_ID('tempdb.dbo.#translations') IS NOT NULL
DROP TABLE #translations
CREATE TABLE #translations (
from_char char(1) NOT NULL PRIMARY KEY,
to_char... October 22, 2021 at 3:27 pm
Yep, doing this yourself will be very complex.
I would let SQL itself determine the type(s) in your situation. This will involve an extra full load of the data. Make every...
October 21, 2021 at 7:04 pm
Viewing 15 posts - 1,186 through 1,200 (of 7,614 total)