Viewing 15 posts - 76 through 90 (of 458 total)
That someone would have to be me. I do get warnings about changes, sometimes, but I don't recall any about dropping relationships. Would it say so specifically, or does it...
October 9, 2020 at 10:36 pm
Good article - thank you. I read through it and created the table and database trigger as it says. Seems to work just right - I removed one of my...
October 8, 2020 at 8:46 pm
Here's exactly what I meant by using Paul White's method to grab the first column values only, then using that result set as the source for further processing. The...
September 3, 2020 at 9:21 am
I can understand SQL having to scan the table / index, but I don't see why SQL would need to do a sort. Btw, an asc index will do,...
September 2, 2020 at 9:13 pm
I can't believe this is so damn difficult. In words, "Read this index, in the order in which it already exists, and return each occurrence of the last values of...
September 2, 2020 at 6:30 pm
No luck. I've been beating my head against my desk for hours, trying all sorts of correlated subqueries and CTEs.
Most of them don't work at all, and the few that...
September 2, 2020 at 6:23 pm
Here's one way of obtaining the distinct first-column values without performing an index scan.
https://www.sqlservercentral.com/forums/topic/calculating-interest-query/page/4/#post-1244493
I'm looking at that, but it's not going well. I have three columns, not one, and...
September 2, 2020 at 1:42 pm
Here is the latest index, specifically for this query only.
CREATE NONCLUSTERED INDEX [ix_MaxDruhaEvidence] ON [dbo].[Podrobnosti]
(
[EvidenceLetter] deSC,
[EvidenceNumber] deSC,
[EvidenceExtra] deSC
)
WHERE ([EvidenceLetter]<>'1e')
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB =...
September 2, 2020 at 12:42 pm
Jeez - I'm going senile. I read the index name wrong. Here is the correct index def, that it is actually using.
CREATE NONCLUSTERED INDEX [ix_AkcDruhaEvidence] ON [dbo].[Podrobnosti]
(
[AkcesAutoID]...
September 2, 2020 at 12:31 pm
All the indexes show non-clustered. I'm sure I had a clustered index on this originally, but I've done a good bit of expermenting with this table, and probably forgot this...
September 2, 2020 at 12:26 pm
Oh yeah, I forgot about the filter. It's actually the same filter as is used in my original query, but I forgot to put it back in when testing this...
September 2, 2020 at 12:14 pm
I think the optimiser doesn't use the index because there's no benefit in doing so. If you scale up the row count to something sensible and add a column...
September 2, 2020 at 10:55 am
The max list is easy enough to produce. Sorry, I don't fully understand the 'OK' part well enough yet to add that to the query. 'OK' just meaning...
September 2, 2020 at 9:20 am
SELECT a, MAX(CAST(b AS varchar(2)) + c)
FROM (VALUES
('A', 1, 'a'),
('A', 1, 'b'),
('A', 1, 'c'),
('A', 2, 'a'),
('B', 1, ''),
('B', 1, 'a'),
('B', 1, 'b'),
('B',...
September 1, 2020 at 7:15 pm
Viewing 15 posts - 76 through 90 (of 458 total)