Viewing 15 posts - 211 through 225 (of 1,468 total)
That's a rather selfish thing to do.
Rather leave your question up, and feed back with what you did to resolve it.
That way, other people can learn from your efforts.
January 29, 2022 at 5:58 am
January 29, 2022 at 5:52 am
You need to include your variable assignment in the query
SELECT @NUM_RECORDS = COUNT(*)
FROM DBO.DataImportFileImportHistory AS T1
WHERE T1.FILENAME = @FILENAME;
January 29, 2022 at 5:47 am
A simplified query to return dateStamp as datetime, and wkStamp as 1st day of teh week.
You can then use the value in wk_stamp to do your grouping by
January 28, 2022 at 3:59 pm
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
Viewing 15 posts - 211 through 225 (of 1,468 total)