Viewing 15 posts - 211 through 225 (of 1,468 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...
I would look at writing the query in a manner similar to this
WITH cteBase AS (
SELECT TOP ( 9223372036854775807 ) /* Force SQL to...
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#] =...
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...
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...
I gave you an example of how to do exactly this in your previous post
You just need to change the table names
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...
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,...
Another possible issue is a cross-DB table creation and insert
INTO ExtractReports.dbo.TPls
Is the query running in the ExtractReports DB?
Viewing 15 posts - 211 through 225 (of 1,468 total)