Viewing 15 posts - 1 through 15 (of 265 total)
Not sure if this will be any faster, you might have to look at putting indexes on the table if it is not:
;with cte as
(
...
April 8, 2024 at 7:26 pm
I think I fixed the issue. I added t_date to the partition part and now I am getting the correct number of records. The query is super slow...
April 7, 2024 at 7:54 pm
I think I fixed the issue. I added t_date to the partition part and now I am getting the correct number of records. The query is super slow though. It...
April 6, 2024 at 4:44 am
Seems like you could achieve this with a couple of CTEs. I assume that the value of T_date
could differ, hence why I use window aggregation functions rather than...
April 6, 2024 at 4:25 am
the queries are giving the correct output now.
thank you both so much!
April 4, 2024 at 4:05 pm
Thank you both!! I appreciate your help so much!
I tested another scenario. I added a different company in the list so there are now two not one company.
Drew, your solution...
April 3, 2024 at 11:33 pm
Thank you everyone!
I will try them and report back any issues
April 2, 2024 at 6:52 pm
Thank you everyone.
This is very interesting. Is this a bug within SS that you cannot drop a #temp table inside a SP using the DROP TABLE command? Or is there...
April 2, 2024 at 3:07 pm
one thing I should mention/clarify...
each time I re-use #temp2 I am using a completely different select statement so the columns going into #temp2 will be different.
it is odd that I...
April 2, 2024 at 7:30 am
thank you everyone for your feedback. I will test the code and see how the output looks
April 1, 2024 at 9:25 pm
I gave this a bit more thought...
Returning the MIN value of STRIKE will not work. Instead, do the following...
If the sub-query ever returns an empty result then return the result...
March 29, 2024 at 5:44 am
Run the select without the insert, what type of values are you getting for what would be inserted into STRIKE_CONTRIBUTION?
Is anything in double digits, 99.9999999999999999
If so your numeric(28,27) is...
March 28, 2024 at 12:39 am
It would be simpler and more efficient to just calc the 3rd Friday of the month and then see if there are any rows for that date, i.e., you...
March 19, 2024 at 5:22 pm
One more thing...
The create table and create index code was created before any rows were added to the temp tables. Not sure why the run time grew like that. Any...
March 15, 2024 at 5:07 pm
Viewing 15 posts - 1 through 15 (of 265 total)