Viewing 15 posts - 31 through 45 (of 106 total)
I am sorry for the delay, I was travelling. I have more information that I think it can help. STDORD table has standard orders. System is for people leaving at...
January 12, 2020 at 6:30 am
Hi Frederico,
tried, but it's slower and the result are not the same (much more rows). I hope to get more information tomorrow that I can share with you.
Thanks.
January 8, 2020 at 8:11 pm
Thanks again, Grant. I'm trying to collect more info, especially why those empty columns and the CROSS APPLY. I will get back soon.
January 8, 2020 at 2:09 pm
Let me explain the reason of my code. The original SQL code (developed by another guy) was this one:
DECLARE @FDATO INT = 79961
DECLARE @TDATO INT = 80051
DECLARE...
January 8, 2020 at 5:56 am
New plan after updating statistics (exec sp_updatestats). https://www.brentozar.com/pastetheplan/?id=HydNy_zg8
There is a difference between both queries because in the new one I'm filtering the table CALENDAR to use only the range...
January 7, 2020 at 8:55 pm
Well, I've modified CALENDAR table, adding a column for day of the week so I don't need to use the function. It improved the query but still I'm not happy...
January 7, 2020 at 7:20 pm
Thanks for your advices, Grant. I will review the query and let you know.
January 7, 2020 at 2:53 pm
I'm going to use the easy excuse here :). This is a part of a very long stored procedure and I'm just trying to improve a bit (and I did...
November 12, 2019 at 2:35 pm
Thanks Tom!!! I will follow your advices. 🙂
November 12, 2019 at 12:11 pm
Hi John,
you're right, converting to nvarchar(max) those variables seems to fix the issue. I thought that, considering that datatype was the same, my @SQLString keeps its type and lenght.
About your...
November 12, 2019 at 9:24 am
I've used GetNums, which is like this:
ALTER FUNCTION [dbo].[GetNums](@n AS BIGINT) RETURNS TABLE AS RETURN
WITH
L0 AS(SELECT 1 AS c UNION ALL...
June 13, 2019 at 1:48 pm
Thanks for your answer, Jeff. I've already solved the problem.
June 13, 2019 at 12:42 pm
August 31, 2018 at 3:40 am
Viewing 15 posts - 31 through 45 (of 106 total)