SQL Version: 2008 R2
I'm trying to run this code, but it never completes and I have to manually terminate it. The same thing happens is I only run the SELECT statement portion (without including the Begin Tran and the IF @@ROWCOUNT....).
Don't quite understand why?
CODE:
Begin TRAN
INSERT INTO vPCCertificateTypes (VendorGroup, CertificateType, Description, Active, Category)
SELECT HQCo, 'MBE', 'Minority-owned Business Enterprise', 'Y', 'Affirmative Action'
FROM HQCO
Where HQCo IS NOT NULL
AND HQCo <> 100
AND HQCo <> 99
IF @@ROWCOUNT <> 44 ROLLBACK ELSE COMMIT
Bob Sutor