Viewing 15 posts - 706 through 720 (of 7,597 total)
There is no query that will tell you what index(es) were created in the last few days. SQL Server itself does not store that info anywhere.
July 27, 2022 at 12:54 am
I'm very confused about what final results you want to see. Here's a query that returns all columns; adjust it to return only the columns you want.
SELECT...
July 25, 2022 at 7:10 pm
Paul White and/or Itzik Ben-Gan have done write ups on the problem with non-unique sorts. The solution is indeed to make sure you specify ORDER BY values that will insure...
July 25, 2022 at 6:16 pm
select m.CompanyId,m.PackageId,m.partsfamilyid,max(m.countparts) as countparts,
STRING_AGG('(' + CONVERT(VARCHAR(8000), countPartsValues) + ')' + CONVERT(VARCHAR(8000), MSLIDValue),'|') WITHIN GROUP(ORDER BY MSLIDValue ASC) AS MSLDIFF
from #final m
inner...
July 21, 2022 at 5:38 pm
Could just be?:
SELECT a.artigo,
a.descricao,
Artigo_2.unidadebase,
b.[vendas ultimo semestre],
...
July 21, 2022 at 5:07 pm
SELECT d1.*
FROM #DETAIL d1
WHERE d1.IDR < (SELECT MIN(d2.IDR) FROM #DETAIL d2 WHERE d2.ID = d1.ID AND d2.BALANCE < 0)
July 20, 2022 at 4:59 pm
What is the definition of table1?
July 20, 2022 at 3:46 pm
Hi Experts,
Below query is scanning index on column 'created' where I was expecting it to scan on CID which is the 'where' clause and PK?
Can you help me understand...
July 20, 2022 at 3:38 pm
Ok, fair enough
SELECT
dtstamp, equipment_id, temperature
FROM (
SELECT *,
ROW_NUMBER() OVER(PARTITION BY...
July 19, 2022 at 8:52 pm
You stated nothing about equipment_id in your original post. How am I supposed to include logic for your equipment_ids when you tell us nothing about them?!
July 19, 2022 at 8:23 pm
Maybe?
SELECT
dtstamp, equipment_id, temperature
FROM (
SELECT *,
ROW_NUMBER() OVER(PARTITION BY DATEDIFF(HOUR, 0,...
July 19, 2022 at 4:52 pm
Gen script should be able to do that, just specify the correct scripting options in SSMS before you gen the script.
July 18, 2022 at 6:53 pm
My question would be, why are you using two tables to do one thing? It looks to me like it should be a single table because there appears to...
July 15, 2022 at 9:07 pm
Btw, you don't seem to realize that you are not including the last day of the month in the Calendar table.
CREATE OR ALTER VIEW Test
AS
SELECT * FROM...
July 15, 2022 at 6:40 pm
That join will work fine too.
Try an ORDER BY C1.RowNum so that you can see the matches between rows, if any, in order.
SELECT C1.Id
...
ON...
July 15, 2022 at 6:32 pm
Viewing 15 posts - 706 through 720 (of 7,597 total)