Viewing 15 posts - 1 through 15 (of 21 total)
Don't force SQL to fully reprocess the conditions before DELETEing each row, instead use WHERE CURRENT OF in the DELETE:
DECLARE @user VARCHAR(50)
DECLARE @role VARCHAR(50)
DECLARE db_cursor CURSOR...
April 24, 2019 at 6:44 pm
Being new to cursors, what exactly does the WHERE CURRENT OF db_cursor do? It will keep the SQL criteria in memory on each iteration of the loop?
April 24, 2019 at 6:43 pm
Thanks Luis, yes I see that I had forgotten to move the cursor forward. I added that and it now performs the transaction. Just curious what you mean by "suggest...
April 24, 2019 at 6:35 pm
WITH CTE ASMarch 26, 2019 at 4:13 pm
It looks like because G.LINE_NBR was commented out in CTE2, it can't be used as a join condition in the final Select statement, which is the original issue I had....
March 26, 2019 at 2:28 pm
March 26, 2019 at 2:04 pm
March 26, 2019 at 1:50 pm
I've modified the query to do the SUM aggregation in the final Select query, and I'm just getting the row data in the inner queries. The data is correct in...
March 26, 2019 at 1:19 pm
March 26, 2019 at 12:51 pm
PS_DIRECT_DEPOSIT
CREATE TABLE [dbo].[PS_DIRECT_DEPOSIT]
(
[EMPLID] VARCHAR(11) COLLATE Latin1_General_BIN NOT NULL
, [EFFDT] DATETIME NOT NULL
,...
March 21, 2019 at 11:56 am
March 21, 2019 at 11:52 am
Viewing 15 posts - 1 through 15 (of 21 total)