Viewing 15 posts - 1 through 15 (of 10,139 total)
Happy New Year, Threadizens.
It's been ages since I had enough time to visit here and actually post something, and I wasn't sure if I'd have time today but there were...
January 12, 2021 at 12:16 pm
I am looking for an example on how to query several tables, around 50 tables, to find all unique records between them. I cant find anything other than a...
September 4, 2020 at 6:39 am
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 first...
September 3, 2020 at 7:17 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...
September 3, 2020 at 6:49 am
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,...
September 2, 2020 at 1:47 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
September 2, 2020 at 1:08 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...
September 2, 2020 at 1:00 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...
September 2, 2020 at 12:58 pm
That index is seriously wide, and filtered. It will only be used by queries which have the same filter.
What proportion of the table columns does it include?
What's the clustered index...
September 2, 2020 at 11:19 am
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 to...
September 2, 2020 at 10:12 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', 2,...
September 1, 2020 at 1:06 pm
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', 2, ''),
('C', 1,...
September 1, 2020 at 12:23 pm
If the symbols were the other way around it could be a graphic of a euphemism for falling over.
August 18, 2020 at 3:35 pm
Your result set is dependant upon an order yet your source data has no column defining this order. Is there such a column?
If so, can you provide a script to...
August 14, 2020 at 7:17 am
Thanks for response. So if I understand it correct from the above ....
one block of insert for locations and another for individuals
INSERT into dbo.Locations ...SELECT ....FROM dbo.HouseholdTemp WHERE <conditions>...
June 19, 2020 at 2:45 pm
Viewing 15 posts - 1 through 15 (of 10,139 total)