This script of mine is taking heck of a long time to execute, can you tell me if anything is wrong with this.
Thank you very much..
CREATE TABLE #Tab01
(
RequestId Numeric(10)
)
CREATE TABLE #Tab02
(
RequestId Numeric(10)
)
INSERT INTO #Tab01
SELECT SL.RequestId FROM SabreLog SL WITH (NOLOCK)
WHERE WebServiceId = 12 AND SL.Response NOT LIKE '%<Error ErrorCode=%'
INSERT INTO #Tab02
SELECT T1.RequestId FROM #Tab01 T1
INNER JOIN SabreLog SL WITH (NOLOCK)
ON T1.RequestId= SL.RequestId
AND SL.Response LIKE '%<Error ErrorCode=%'
SELECT * FROM #Tab02
DROP TABLE #Tab01
DROP TABLE #Tab02