Viewing 15 posts - 181 through 195 (of 2,645 total)
Here is a script for getting the definition of temp tables:
https://www.sqlservercentral.com/scripts/get-temp-table-definition
March 14, 2024 at 11:27 am
like inlinable scalar udfs requiremnts , is there any link which can tell me requiremnts of UDF like this one
March 13, 2024 at 9:59 am
This might be more efficient:
;WITH CTE AS
(
SELECT *,
ROW_NUMBER() OVER (ORDER BY (SELECT...
March 13, 2024 at 12:41 am
SELECT Color,
SampleType,
SUM(SampleValue) SampleValue
FROM #SampleData
GROUP BY Color,
...
March 13, 2024 at 12:16 am
From ChatGPT 4:
The provided deadlock XML contains a lot of information, but let's focus on the core elements to diagnose and address the deadlock issue.
First, let's break down the XML...
March 11, 2024 at 10:41 pm
There was a big improvement to the performance of scalar valued functions in SQL Server 2019.
But you need to make sure the improvement is switched on to get the benefit,...
March 11, 2024 at 10:08 am
If you need the count to be NULL when there aren't 5 preceding days then this query will do the trick:
declare @DaysToLookBack int = 5
select a.company,
...
March 9, 2024 at 11:56 pm
declare @DaysToLookBack int = 5
select *
from [dbo].[TestTable1] a
cross apply (select count(*) Count
...
March 9, 2024 at 11:14 pm
There aren't 3 values less than 88 within 5 days of (including the reference date) 2024-02-28
2024-02-28 minus 4 days is 2024-02-24.
So there are only 2 rows less than that (11,...
March 9, 2024 at 9:16 am
The gaps in dates shouldn't be an issue.
The data you provided isn't the data you put in your amendment of the query.
The results from the test data you provided look...
March 9, 2024 at 6:39 am
Has TRADE_DATE got a time part on it? If so is it not always midnight?
Can you supply some test data?
March 9, 2024 at 5:12 am
declare @DaysToLookBack int = 5
select *
from [dbo].[TestTable1] a
cross apply (select COUNT(*) Count
...
March 9, 2024 at 1:23 am
I would just leave it all in one table.
How many rows has this table got?
March 4, 2024 at 6:11 pm
Could you change the method of deleting rows so that you drop the clustered index on the view, then delete the thousands of rows, then reinstate the clustered index?
Also check...
February 26, 2024 at 11:46 am
You could see how the performance is if you drop the clustered index, after dropping the clustered index the view will just behave like a normal view.
Check what indexes are...
February 22, 2024 at 3:21 pm
Viewing 15 posts - 181 through 195 (of 2,645 total)