Viewing 15 posts - 46 through 60 (of 465 total)
Got it - I was missing an index for AkcesAutoID on the Podrobnosti table. Adding that makes it run properly.
March 16, 2022 at 8:26 pm
Extremely important thing to remember:
A common table expression (CTE) is not a table. It is an expression. A query. It does not, in any way, represent data storage, temporary...
March 16, 2022 at 7:45 pm
1. Yes:>
-----------------------------------------------------
CREATE TABLE [dbo].[Akces](
[AkcesAutoID] [int] IDENTITY(1,1) NOT NULL,
[Rok] [smallint] NOT NULL,
[AkcesitPred] [varchar](5) NOT NULL,
[Akcesit] [int] NOT NULL,
[KusuVKatalogu] [int] NULL,
[Petrol] [bit] NULL,
[BezPoctuKusu] [bit] NULL,
[Jine] [bit] NULL,
[UzOdepsane] [bit] NULL,
[VDatabaziMK] [bit] NULL,
[Poznamka] [nvarchar](4000)...
March 15, 2022 at 10:16 pm
Sorry, guess I wasn't completely clear. Space is not a consideration - I have 3 TB of disk space on the machine and less than 1 TB used. The database...
September 20, 2021 at 8:59 pm
I've started looking at designing a system of mutual controls, set up on numerous systems, which would periodically interrogate each other and report to a central point when one of...
September 16, 2021 at 2:37 pm
Last re-start was just about a week ago. When and how many before that I don't know, but as I wrote earlier, this machine restarts occasionally for no reason that...
September 16, 2021 at 2:34 pm
Around two weeks ago - I don't recall exactly and I'm not at work right now. I'll check. There are also sporadic seeming power failures in this machine, and I...
September 15, 2021 at 9:25 am
So here's a period at the end of the chapter, although a rather unsatisfying one.
I played with the T-SQL routine that does the actual backup, tidying up the syntax, adding...
September 14, 2021 at 4:49 pm
Well, now I feel like a complete dork. I re-connected to the server this morning, which was still logged into my account from last week, and still had SSMS open...
September 13, 2021 at 9:58 am
No, the database name is correct. From the VBScript routine, it is passed as a string literal, and those have not changed, nor has the name of any of the...
September 11, 2021 at 8:58 am
When choosing a plan optimiser has to estimate the data sets coming out of each of the objects (tables, views, functions) joined in the query.
it uses indexes, statistics, to...
April 14, 2021 at 2:19 pm
Yes. Eirikur's version of DelimitedSplit8k is fast AND is an inline table valued function. Everyone who can't use String_Split should get a copy. Also, use of...
April 14, 2021 at 9:17 am
Yes. Eirikur's version of DelimitedSplit8k is fast AND is an inline table valued function. Everyone who can't use String_Split should get a copy. Also, use of an inline...
April 13, 2021 at 9:58 pm
You could maybe replace the whole WHILE LOOP'ing function with Eirikur's LEAD splitter. If this is SQL Server 2016+ you could use the built-in STRING_SPLIT itvf (since the...
April 13, 2021 at 8:34 pm
The query could be simplified, no? Maybe something like this
select top(1) p.AkcesAutoID
from dbo.podrobnosti p
join ro.fntStringsToTable('J') ltrs on ltrs.EvidenceLetter = p.EvidenceLetter
...
April 13, 2021 at 8:25 pm
Viewing 15 posts - 46 through 60 (of 465 total)