Viewing 15 posts - 271 through 285 (of 1,390 total)
I cannot remember if you are the person who set this site up or not, I know he was called Steve, just forgot his surname.
That's Steve Jones. He's the...
January 6, 2023 at 3:39 pm
As per Phil needs data. Hmm... either the rows would need to be expanded or dynamic sql? In order to use ROWS BETWEEN N PRECEDING we're stuck with N being
January 6, 2023 at 1:41 pm
Sorry I shouldn't have wrote that. I love horses and racing too. Yes, it passes my visual test now 🙂
January 6, 2023 at 4:46 am
After looking at it again (and again) it was updated a few times
January 6, 2023 at 2:53 am
Anyway code could be inferred from what's there. I don't want to know about horse racing. Untested you could try
drop FUNCTION [dbo].[udf_GET_EACHWAY_RETURN_itvf];
go
create or ALTER FUNCTION [dbo].[udf_GET_EACHWAY_RETURN_itvf](
...
January 6, 2023 at 2:34 am
Oops posted in the wrong spot
January 6, 2023 at 2:32 am
It not a fully asked question imo. It's a good one tho. Hopefully some of that medication was prescribed. You're looking for more efficient code. It comes down to demonstrating...
January 5, 2023 at 9:43 pm
Do you have a good example of an INSTEAD OF trigger for use with UPDATEs? I've not seen a good one yet.
It hasn't been necessary for my work so...
January 4, 2023 at 1:16 am
Except for the occasional Indexed View, this is one of the many reasons why I hate views.
Ha my exception is for VIEWS with INSTEAD OF triggers
January 4, 2023 at 12:30 am
Having performance issues while filtering a view is not uncommon. Is the view indexed? How much latitude is there for making changes?
January 4, 2023 at 12:20 am
Still works
select *
from drview
where field2 = 'x';
January 3, 2023 at 10:56 pm
Works. Not sure what the issue is
drop view if exists drview;
go
create view drview
AS
with cte as (
select *
from (values ('x', 'x'), ('x', 'x'), ('x',...
January 3, 2023 at 10:39 pm
Happy New Year, everyone, and welcome to 2023!
HNY SSC! Thank you Steve for being a great host. All the things 😉
January 3, 2023 at 10:12 pm
I could be wrong but that looks like it will do a full scan of the table for each grouping of rows. Why not just do a single pass...
December 28, 2022 at 4:41 pm
One approach could be to use a WHILE loop to increment grp values based on row counts and the DATEDIFF interval
Starting with Jeff's code:
--=================================================================================================
-- ...
December 27, 2022 at 10:51 pm
Viewing 15 posts - 271 through 285 (of 1,390 total)