Tag Archives: SQL

Microsoft SQL Server’s Database Publishing Wizard BatchParser error

http://download.microsoft.com/download/4/4/D/44DBDE61-B385-4FC2-A67D-48053B8F9FAD/SQLServer2005_XMO_x64.msi

Could not load file or assembly ‘Microsoft.SqlServer.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91’ or one of its dependencies. The system cannot find the file specified. Installing the above file will fix this problem on 64-bit machines!

I remember having a hard time finding the answer to this problem about a year ago, and I just ran into it again.

Flattr this!

T-SQL Multi-Table Delete

I was trying to run a DELETE query on multiple tables and I kept getting this error:

The DELETE statement conflicted with the REFERENCE constraint

I’m not that great with SQL, but I can get by. DELETEs have always been somethng that have given me trouble. So, I thought I’d share this simple fix.

DELETE FROM PRODUCT
FROM BOOK
WHERE BOOK.ID = PRODUCT.BOOK_ID
AND BOOK.ID = @BOOK_ID

You just have to make sure you put the table with the FK as the first table in the query.

I guess I should have paid a little more attention in Database class. We learned Oracle, which is different from Microsoft’s SQL in many ways.

Flattr this!