SQL Version: 2008 R2
I am having a serious problem. I ran the following code to perform a simple table record insert which ran successfully. However, after running this code I could no longer access the related table. I couldn't run a query against it. I tried to delete all the records and that wouldn't work either. When attempting to run any DML statements (i.e. Select * From vPCCertificateTypes) against this table SQL gets locked up and never returns anything and no error messages. I have to manually stop the query. Now the entire SQL system is running slow.
Any help would be greatly appreciated. The code I ran to originally insert the records is below.
Regards,
Bob Sutor
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