Viewing 15 posts - 661 through 675 (of 2,645 total)
As a bit of a sidebar, you may have some people come back with a suggestion of using the built-in STRING_SPLIT() function. That will seem to work but there...
October 8, 2022 at 11:08 pm
Have you tried clearing the cache and running the queries again?
DBCC FREEPROCCACHE
October 4, 2022 at 5:26 pm
You should look at partitioning the table by period.
September 13, 2022 at 3:11 pm
Can you try this?
It should move the sort to the inserts into the clustered index on the temporary table
DROP TABLE IF EXISTS #temp;
CREATE TABLE #temp
(
...
September 12, 2022 at 6:09 pm
The question is too long for me to read.
If you are inserting with DISTINCT, as you appear to be, that will ensure no duplicates are generated at the source
If you...
September 11, 2022 at 3:12 pm
I would use an SSMS add-in like ApexSQL Refactor.
There is a free version of it here https://en.freedownloadmanager.org/Windows-PC/ApexSQL-Refactor-FREE.html
I think you only get a trial period with the current version from...
September 1, 2022 at 3:58 pm
Alternatively using OUTER or CROSS APPLY
SELECT c.CityName, x.MonthName
FROM dbo.City c
OUTER APPLY (SELECT TOP(1) m.MonthName
...
August 31, 2022 at 6:27 pm
If I try to use what I showed it fails. I get an error on WO.dtCall, says multi-part identifier could not be bound.
Thanks
Try this:
FROM PROPERTY...
August 31, 2022 at 4:51 pm
Use CROSS APPLY instead of INNER JOIN
FROM PROPERTY P
INNER Join UNIT U
ON P.hMy = U.hProperty
INNER...
August 31, 2022 at 3:32 pm
OK, but I still can not figure this out. OR does not work. What I need to find out is to gather data for customers who had invoices before...
August 26, 2022 at 5:16 pm
I wouldn't write dates as '09/01/2022'
What does it mean? Is it 1st September or 9th January?
Better to write dates in ISO format so for 9th January 2022 write it as...
August 26, 2022 at 4:18 pm
Wouldn't you add the absolute values?
5% + abs(-5%) + abs(-3%)
August 19, 2022 at 10:05 pm
Do you think it's not a good thing? and how do you think like it's a HW work(it's not a HW but I would say type of that). anyhow...
August 19, 2022 at 4:51 pm
Now has got the answer he wanted he's deleted the evidence. 🤣
August 18, 2022 at 11:16 pm
Here you go, this is an answer for your homework lol:
select t1.station_name, count(distinct t2.station_name) reachable_stations
from train_st t1
left join train_st t2
...
August 18, 2022 at 10:37 pm
Viewing 15 posts - 661 through 675 (of 2,645 total)