I've got a SQL Query
(access pass through query) that when running, it locks up the table and I cant do anything with it. Its locked up for over an hour because the table is huge, (database is 250 gigs in size).. The SQL looks like as follows, but I'm hoping there is a way to do the select query without locking up the table..
INSERT INTO BoydAmazonToday1
(LocalSKU, [Price Currency], Quantity)
SELECT TOP (3000000) Inventory.LocalSKU, Inventory.Price, InventorySuppliers.BoydQuantityAvailable
FROM Inventory INNER JOIN
InventorySuppliers ON Inventory.LocalSKU = InventorySuppliers.LocalSKU INNER JOIN
Suppliers ON InventorySuppliers.SupplierID = Suppliers.SupplierID
WHERE (NOT (Inventory.Price = 0)) AND (NOT (Inventory.Price IS NULL)) AND (InventorySuppliers.BoydQuantityAvailable > 49) AND (Inventory.Category LIKE '%Books%' OR
Inventory.Category LIKE '%DVDs%' OR
Inventory.Category LIKE '%Music%' OR
Inventory.Category LIKE '%VHS%') AND (Inventory.Discontinued = 0) AND (Suppliers.[Boyd-AmazonBackOrder] = 1) AND (InventorySuppliers.PrimarySupplier = 1) AND
(NOT (Inventory.LocalSKU = '9780205309023u1')) AND
(NOT (Inventory.LocalSKU = '9780205309023')) AND
(NOT (Inventory.LocalSKU = '9781400052189')) AND
(NOT (Inventory.LocalSKU = '9781400052189U1')) AND
(NOT (Inventory.LocalSKU = '9781435732865')) AND
(NOT (Inventory.LocalSKU = '9781435732865U1'))
ORDER BY Inventory.Price ASC