Viewing 15 posts - 196 through 210 (of 2,897 total)
Please select Johan's post as the correct answer (not mine). He did all the work.
October 20, 2021 at 5:59 pm
If you're really wanting to examine growth rate, maybe you can look at backup history and see the size of the database backups over time.
Backups are usually smaller than the...
October 20, 2021 at 3:17 pm
Select *
, stuff( ( select rtrim(T2.Postcode) + CASE WHEN T2.id = T1.id + 5 then '' else ', ' end
from Postcodetbl T2
where T2.id between T1.id + 1 and T1.id +...
October 20, 2021 at 2:22 pm
Johan's code assumes postcode is entered sequentially and uses ID to order them.
But if LL15 was Inserted before LL14 then you will get different results than you want because the...
October 20, 2021 at 1:56 pm
Never say "Never" ! Why is postcode varchar(50) ?
Also, Doesn't seem like a good idea to have the table name the same as a column name.
October 20, 2021 at 1:40 pm
PostCode is varchar(50). 50 x 5 = 250 plus commas ( and spaces ?).
#TMP is your table name. Johan did not know the name of your table at the time.
Using...
October 20, 2021 at 1:37 pm
PostCodeNext is not long enough to hold 5 PostCodes, commas and spaces.
October 20, 2021 at 1:26 pm
This is a bit like asking why the Blue car gets better gas mileage than the Red car.
Red cars are faster.
October 18, 2021 at 3:50 pm
Performance issues with maintenance tasks like update stats takes forever
This is SQL 2014, so we can have only 1 index on the table..
I tried implementing partitionning in dev, but...
October 18, 2021 at 3:05 pm
Any time this combination of values changes, you will get a new line. So pare down the fields in your select and group by until you only get what you...
October 8, 2021 at 7:20 pm
In SQL Server 2019 you can also utilize the GREATEST function.
That documentation seems to suggest that it's only available on Azure instances and not "standalone" instances. Can someone...
October 8, 2021 at 2:22 pm
Were the backups working, and just started failing ? Configuration change ?
What tells you they failed ?
October 7, 2021 at 4:02 pm
I use the first 2 fingers on each hand, and also the ring finger on my left hand for the 'A' key and the <shift> key. I use my thumbs...
October 4, 2021 at 7:46 pm
That might work if I can figure out how to get line breaks after each row.
September 29, 2021 at 4:16 pm
Viewing 15 posts - 196 through 210 (of 2,897 total)