J
Jack
Hello,
I'm trying to delete records that have related data in 3 other tables.
i'm using Access 2007 with linked tables to the SQL 2000 database. I've
also tried running this in query analyzer.
When I run the select query it returns 12 records
:
SELECT DISTINCTROW dbo_Sessions.*, dbo_Clients.ClientNo, dbo_Sessions.TrxNo,
dbo_Therapists.TherapistID, dbo_Services.ServiceID, dbo_TrxMaster.TrxNo,
dbo_TrxMaster.TrxDate, dbo_TrxMaster.Amount
FROM (((dbo_Sessions LEFT JOIN dbo_Services ON dbo_Sessions.ServiceNo =
dbo_Services.ServiceNo) LEFT JOIN dbo_Clients ON dbo_Sessions.ClientNo =
dbo_Clients.ClientNo) LEFT JOIN dbo_TrxMaster ON dbo_Sessions.TrxNo =
dbo_TrxMaster.TrxNo) LEFT JOIN dbo_Therapists ON dbo_Sessions.TherapistNo =
dbo_Therapists.TherapistNo
WHERE (((dbo_Clients.ClientNo) Is Null));
When I run the delete query I recieve the message similar to microsoft
access can't delete 0 record in the delete query due to key violations and 0
record due to lock violations
DELETE DISTINCTROW dbo_Sessions.*, dbo_Clients.ClientNo, dbo_Sessions.TrxNo,
dbo_Therapists.TherapistID, dbo_Services.ServiceID, dbo_TrxMaster.TrxNo,
dbo_TrxMaster.TrxDate, dbo_TrxMaster.Amount
FROM (((dbo_Sessions LEFT JOIN dbo_Services ON dbo_Sessions.ServiceNo =
dbo_Services.ServiceNo) LEFT JOIN dbo_Clients ON dbo_Sessions.ClientNo =
dbo_Clients.ClientNo) LEFT JOIN dbo_TrxMaster ON dbo_Sessions.TrxNo =
dbo_TrxMaster.TrxNo) LEFT JOIN dbo_Therapists ON dbo_Sessions.TherapistNo =
dbo_Therapists.TherapistNo
WHERE (((dbo_Clients.ClientNo) Is Null));
What am I doing wrong??? This is driving me crazy.
I'm trying to delete records that have related data in 3 other tables.
i'm using Access 2007 with linked tables to the SQL 2000 database. I've
also tried running this in query analyzer.
When I run the select query it returns 12 records
:
SELECT DISTINCTROW dbo_Sessions.*, dbo_Clients.ClientNo, dbo_Sessions.TrxNo,
dbo_Therapists.TherapistID, dbo_Services.ServiceID, dbo_TrxMaster.TrxNo,
dbo_TrxMaster.TrxDate, dbo_TrxMaster.Amount
FROM (((dbo_Sessions LEFT JOIN dbo_Services ON dbo_Sessions.ServiceNo =
dbo_Services.ServiceNo) LEFT JOIN dbo_Clients ON dbo_Sessions.ClientNo =
dbo_Clients.ClientNo) LEFT JOIN dbo_TrxMaster ON dbo_Sessions.TrxNo =
dbo_TrxMaster.TrxNo) LEFT JOIN dbo_Therapists ON dbo_Sessions.TherapistNo =
dbo_Therapists.TherapistNo
WHERE (((dbo_Clients.ClientNo) Is Null));
When I run the delete query I recieve the message similar to microsoft
access can't delete 0 record in the delete query due to key violations and 0
record due to lock violations
DELETE DISTINCTROW dbo_Sessions.*, dbo_Clients.ClientNo, dbo_Sessions.TrxNo,
dbo_Therapists.TherapistID, dbo_Services.ServiceID, dbo_TrxMaster.TrxNo,
dbo_TrxMaster.TrxDate, dbo_TrxMaster.Amount
FROM (((dbo_Sessions LEFT JOIN dbo_Services ON dbo_Sessions.ServiceNo =
dbo_Services.ServiceNo) LEFT JOIN dbo_Clients ON dbo_Sessions.ClientNo =
dbo_Clients.ClientNo) LEFT JOIN dbo_TrxMaster ON dbo_Sessions.TrxNo =
dbo_TrxMaster.TrxNo) LEFT JOIN dbo_Therapists ON dbo_Sessions.TherapistNo =
dbo_Therapists.TherapistNo
WHERE (((dbo_Clients.ClientNo) Is Null));
What am I doing wrong??? This is driving me crazy.