Record is deleted error

L

Lee

I inherited the Insert Into query below:

INSERT INTO TblTempAccount ( ID, AccountNumber)
SELECT AccountInfo.ID, PrivateAccount.AccountNumber
FROM ((AccountInfo LEFT JOIN PrivateAccount ON
AccountInfo.ID=PrivateAccount.ID)
LEFT JOIN TblBilling ON AccountInfo.ID = TblBilling.ID)
WHERE (((PrivateAccount.AccountNumber) Is Not Null And
(PrivateAccount.AccountNumber)<>'' And
(PrivateAccount.AccountNumber)<>IsNull
(AccountInfo.AccountNumber))) Or
(((AccountInfo.AccountNumber)<>''))

This query ran fine on Access Tables but I've upsized to
Sql Server and now whenever this is run I get the
message "Record is deleted". There are no Unique indexes
on the TblTempAccount table. In addition What does the
(PrivateAccount.AccountNumber)<>IsNull
(AccountInfo.AccountNumber) part of the where clause do?
It runs ok if I SELECT DISTINCT. Anybody have an idea as
to what's going on here?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top