Viewing 15 posts - 211 through 225 (of 1,464 total)
I suspect that part of the problem is identifying what the value in t_stamp means.
From your query, it appears that you are assuming it to be the number of seconds...
January 28, 2022 at 3:45 pm
I would look at writing the query in a manner similar to this
WITH cteBase AS (
SELECT TOP ( 9223372036854775807 ) /* Force SQL to...
January 28, 2022 at 2:56 pm
As a side note - Why are you using a LEFT JOIN and a WHERE?
In both queries you use
LEFT OUTER JOIN [Repit].[LEVYDTA].[WHSWHSM] ws
ON t.[RCWHS#] =...
January 28, 2022 at 2:28 pm
Sorry about deleting your question. I clicked the wrong button.
To get the old value, use DELETED.YourFieldname
To get the new value, use INSERTED.YourFieldName
So, I would alter the description of the UPDATE...
January 28, 2022 at 6:18 am
Since I dont have actual tables and data, the code is untested.
That said, I believe that the following code will do the UPSERT and AUDIT without the need for a...
January 27, 2022 at 3:41 pm
I gave you an example of how to do exactly this in your previous post
You just need to change the table names
January 26, 2022 at 2:21 pm
You will have to do 2 separate deletes. And then I would also look at adding error handling and transaction control.
Also, depending on the size of the data, you may...
January 24, 2022 at 2:09 pm
I would try replacing the existing index with one of the following indexes.
Test the performance of each one
CREATE NONCLUSTERED INDEX IDX_ZPLID
ON ExtractReports.dbo.TPls ( ZPLID, ZfeatureKey,...
January 20, 2022 at 1:35 pm
Another possible issue is a cross-DB table creation and insert
INTO ExtractReports.dbo.TPls
Is the query running in the ExtractReports DB?
January 20, 2022 at 1:29 pm
You have a key lookup, which you want to eliminate.
Please post the definition of the index IDX_ZPLID
January 20, 2022 at 1:16 pm
With no usable SQL or data to work with, maybe this is what you are looking for
SELECT reknr, oms25_0
...
January 20, 2022 at 8:59 am
Well this is definitely a head scratcher. The following code is not pretty, but it seems to get the expected results
WITH cteBase AS (
SELECT ...
January 17, 2022 at 3:23 pm
Since you are the one that will be supporting the code and answering if/when it breaks, you really need to try and understand what the code is doing.
The following 2...
January 14, 2022 at 2:49 pm
Assuming that the data type of [STARTDATE] is date or datetime, and that your "WEEK" is defined as Monday to Sunday, the following SQL should work
SELECT ...
January 14, 2022 at 7:34 am
I would look at trying to find a way to reduce the number of rows returned from Parts.Nop_PartsFamilyAttribute [Estimated Number of Rows = 4305960]. Maybe look at changing the INER...
January 6, 2022 at 3:51 pm
Viewing 15 posts - 211 through 225 (of 1,464 total)