That means that you are not selectively deleting the data - you are replacing it with entirely new data.
Be very careful with this - you are deleting your data forever - make sure you have archived it.
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
, intime = MIN(intime)
, outtime = MAX(outtime)
TRUNCATE TABLE dbo.emp
INSERT INTO dbo.emp
DROP TABLE dbo.emp_new
DECLARE @l_error_message AS NVARCHAR(2048)
, @l_error_number AS INT
, @l_error_state AS INT
, @l_error_severity AS INT
, @l_error_line AS INT
SELECT @l_error_message = ERROR_MESSAGE()
, @l_error_number = ERROR_NUMBER()
, @l_error_state = ERROR_STATE()
, @l_error_severity = ERROR_SEVERITY()
, @l_error_line = ERROR_LINE()
IF @@TRANCOUNT >= 1
'Error #%d occured at line %d: %s'
) WITH NOWAIT
thanks pootle the caption of yours is correct i remember i was the reason for the caption any way your codes were always very complicated very perfect. I had to understand the code. i tried even putting case condition to get the o/p but failed. any way
thanks again and again you were for me