Viewing 15 posts - 631 through 645 (of 2,648 total)
To be absolutely clear, you want a:
2) unique clustered [index] on (tenant,year,id)
And if you partition the data (which typically wouldn't be necessary here), partition it...
December 30, 2022 at 11:46 pm
@frederico_fonseca I apologize, I missed that you were doing a recursive loop there. My bad.
don't worry about it.
December 30, 2022 at 8:20 pm
thanks Jeff.
regarding the "performance and cartesian joins" - splitting the CTE to insert the BASE dates onto a temp table and then joining that temp table onto the main table...
December 30, 2022 at 7:14 pm
To be absolutely clear, you want a:
2) unique clustered [index] on (tenant,year,id)
And if you partition the data (which typically wouldn't be necessary here), partition it by (tenant,...
December 30, 2022 at 6:54 pm
I added 1000 "sets" of 3 groups, each with 13 dates. The Cartesian products persisted in the execution plan, each of them doing reads of 39,078,039 rows.
Too bad because,...
December 30, 2022 at 6:37 pm
@frederico_fonseca I had the same idea as you initially, but your solution will not work either. What if there were 20 groups instead of 3? What if the gaps...
December 30, 2022 at 6:36 pm
in order to split a string like that into individual columns you have to first split into rows then aggregate onto columns
sample code below - function DelimitedSplit8K_LEAD is from Erikur...
December 30, 2022 at 5:32 pm
@jeff-moden - did a small change on original code to "correct" one duplicated entry that was on both group 2 and 3 (darn time part messing up)
December 30, 2022 at 5:19 pm
In this case I cannot see anyway to predict when missing dates are needed (2017-11-16) or not needed (2017-11-19 & 2017-11-18).
This is a delayed message as I...
December 30, 2022 at 1:31 pm
my attempt at this.
Do note that the 5 days interval is partially misleading as to the final result because of the time part.
,(7 ,'2017-11-17 09:38:00.000') --Group 2 starts here
,(7 ,'2017-11-12...
December 30, 2022 at 12:48 pm
regardless of other items, there is one thing you do need to confirm - is the HOST set to have cpu at full power all the time (or not) and...
December 28, 2022 at 10:12 pm
CTE is defined BEFORE any of the remaining sql.
with cte1 as (select ...), cte2 as (select ...), cte3 as (select ...)
select *
from table f
inner join cte1 on...
December 28, 2022 at 6:48 pm
neither does it deal with scientific values where the whole string IS the value
declare @String varchar(30)
select @String = '1E02'
select
try_convert(float, @string)
,case
when ISNUMERIC(@String) = 0 then...
December 27, 2022 at 4:24 pm
while this looks like spam post I'll give it a go in case it isn't.
you should first read the manuals for triggers in sql server to fully understand how...
December 27, 2022 at 11:58 am
Do you run a batch file to create your instances?
in my shop all instances are created using a powershell script - with defaults set for everything and potentially override...
December 26, 2022 at 2:52 pm
Viewing 15 posts - 631 through 645 (of 2,648 total)