somaiyatushar11
Programmer
From batch job when the TEMPDB..TABLE table getting updated , it is running for longer time and the TEMPDB databse is running out of space causing problem to the database. There are around 5,20,000 records in TEMPDB..TABLE.
Update statement is as follows:
UPDATE tempdb..TABLE
SET COLUMN1 = '0',
COLUMN2 = '0',
COLUMN3 = NULL,
COLUMN4 = NULL
WHERE COLUMN1 <> '0'
OR COLUMN2 <> '0'
OR COLUMN3 IS NOT NULL
OR COLUMN4 IS NOT NULL
Update statement is as follows:
UPDATE tempdb..TABLE
SET COLUMN1 = '0',
COLUMN2 = '0',
COLUMN3 = NULL,
COLUMN4 = NULL
WHERE COLUMN1 <> '0'
OR COLUMN2 <> '0'
OR COLUMN3 IS NOT NULL
OR COLUMN4 IS NOT NULL