Viewing 15 posts - 676 through 690 (of 2,648 total)
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
You could add a constraint to the table to ensure that one of the values is null and one is not null:
ALTER TABLE DieselTransaction
ADD CONSTRAINT...
August 16, 2022 at 9:48 am
You can do it in a more straight forward way using OFFSET:
DECLARE @PAGE INT = 1;
WHILE (@PAGE <= 5)
BEGIN
...
August 16, 2022 at 9:22 am
I would find having "-- (Values)" between the insert and select statements very annoying.
For me having more new lines and some decent indentation would make it a lot more maintainable.
August 15, 2022 at 6:30 pm
Why don't you want to make supplier and machine column accept null?
August 15, 2022 at 11:40 am
Why can't you use CTEs?[/quote]
I want to compile a view into a third party system that does not support CTEs. If it's not possible to accomplish without CTEs I...
August 5, 2022 at 8:30 pm
If you add the LAG columns to #MyData you could try CROSS JOIN'ing the calendar rows with the distinct IDs. Then LEFT JOIN #MyData on id and date.
I...
August 5, 2022 at 8:23 pm
Drew showed me his wonderful code to do this same thing on another thread. I did a deep dive on it and the concept is wonderfully simple and it...
August 4, 2022 at 8:03 pm
Here is a comparison of the two methods:
/* Windowed Aggregate (MAX) */Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead...
August 4, 2022 at 7:39 pm
Here is a comparison of the two methods:
/* Windowed Aggregate (MAX) */Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0,...
August 4, 2022 at 6:32 pm
Viewing 15 posts - 676 through 690 (of 2,648 total)