Viewing 15 posts - 1,141 through 1,155 (of 13,849 total)
Are you saying that the line in blue is incorrect?
September 27, 2022 at 3:24 pm
Yes there is.
SQLPackage /Action:Publish, with appropriate parameters.
Set the CreateNewDatabase flag to false.
September 27, 2022 at 3:19 pm
That looks trivial and is something which I suggest you attempt yourself.
Just add the columns to the BaseData CTE and then to the SELECT ... FROM BaseData.
September 27, 2022 at 12:14 pm
Please read this article. The FORMAT() function performs very badly.
September 26, 2022 at 10:27 am
Like this?
SELECT t.VID
,t.OrdDate
,t.Prg1
,NewCol = (CASE
...
September 25, 2022 at 5:11 pm
Your query does not parse (it has two WHERE clauses). But no matter, for (current) YTD, use something like
WHERE SomeDate >= DATEFROMPARTS(YEAR(GETDATE()),1,1) AND SomeDate <= GETDATE()
September 25, 2022 at 4:08 pm
We use a third party tool 'ControlM' to create jobs, execute them since we have hundreds of jobs which run everyday so the ask is to run the job...
September 24, 2022 at 10:29 am
The refinements continue!
WITH BaseData
AS (SELECT Data = ISNULL(t.Data, LAG(t.Data, 1, NULL) OVER (ORDER BY rt.yearwk))
,Week = rt.yearwk
...
September 24, 2022 at 10:22 am
Using aliases for table names is also a good idea. Shortens the query and improves readability.
Any one of those left joins could be increasing the number of rows returned beyond...
September 23, 2022 at 9:57 am
Is it so difficult to use code blocks?
SELECT dbo.TrainingHeader.TrainingID
,dbo.TrainingHeader.TrainingNumber
,dbo.TrainingHeader.TrainingTypeID
,dbo.TrainingHeader.TrainingParticipantType
...
September 23, 2022 at 9:42 am
Try this (as my query gets uglier and uglier!):
WITH BaseData
AS (SELECT Data = ISNULL(t.Data, LAG(t.Data, 1, NULL) OVER (ORDER BY rt.yearwk))
...
September 22, 2022 at 2:54 pm
One more question though. When we assign primary key to a column it creates clustered index by default on that column but I know that in future I will be...
September 22, 2022 at 11:03 am
Referring to staging tables as temporary tables is confusing!
For each of the staging tables, create a stored procedure. This stored proc should take care of 'changing the things you want'...
September 22, 2022 at 9:44 am
Are you inserting from the temporary tables to the same 'permanent' table in each case? Or are there different targets?
100,000,0 is not a number – please clarify.
I'd suggest doing the...
September 22, 2022 at 9:14 am
It might be a better option - if using TRY/CATCH - to THROW the error instead of using RAISERROR.
I'd be interested to hear your reasoning.
September 22, 2022 at 8:02 am
Viewing 15 posts - 1,141 through 1,155 (of 13,849 total)