Insert query with two left outer joins gives "Record is Deleted" m

  • Thread starter Doug Goodenough
  • Start date
D

Doug Goodenough

Hi,

I have built an insert query to combine data from 3 tables into one table
based on a key value (RA_ID) on a form. Two of the from tables may or may
not have data associated with the main from table. So I have coded the
select from statement using left outer joins. When I run the query with a
row in the first child table but not in the second it works fine but when I
run the query with a key value that exists in the 2nd child table but not in
the first I get a message saying "record is deleted". Anybody have any ideas
what is causing this?

Here is the query.........

INSERT INTO dbo_RA_HISTORY ( RA_ID, RN_Deter, RN_Rvwr_ID, RA_Type_ID,
RN_Rmk, Dt_RN_Deter, Dt_RA_Submit_to_MD, Dt_RA_Submit_to_IRO,
Involved_RN_Ind, IRO_Reviewer, IRO_Solution_Rmk, IRO_Determination,
Dt_Recd_from_IRO, APPEAL_COORD_ID, MD_ID, ADMINISTRATOR_ID, Dt_of_Invitation,
Member_Attend_Ind, Rep_Attend_Ind, Attorney_Attend_Ind,
Representative_Description, Solution_Rmk, Determntn_ID, Dt_Response,
Dt_LstUpd )
SELECT dbo_RA.RA_ID, dbo_RA.RN_Deter, dbo_RA.RN_Rvwr_ID, dbo_RA.RA_Type_ID,
dbo_RA.RN_Rmk, dbo_RA.Dt_RN_Deter, dbo_RA.Dt_RA_Submit_to_MD,
dbo_RA.Dt_RA_Submit_to_IRO, dbo_RA.Involved_RN_Ind, dbo_iro.IRO_Reviewer,
dbo_iro.IRO_Solution_Rmk, dbo_iro.IRO_Determination,
dbo_iro.Dt_Recd_from_IRO, dbo_RA_Corp_Panel_Rvw.APPEAL_COORD_ID,
dbo_RA_Corp_Panel_Rvw.MD_ID, dbo_RA_Corp_Panel_Rvw.ADMINISTRATOR_ID,
dbo_RA_Corp_Panel_Rvw.Dt_of_Invitation,
dbo_RA_Corp_Panel_Rvw.Member_Attend_Ind,
dbo_RA_Corp_Panel_Rvw.Rep_Attend_Ind,
dbo_RA_Corp_Panel_Rvw.Attorney_Attend_Ind,
dbo_RA_Corp_Panel_Rvw.Representative_Description,
dbo_RA_Corp_Panel_Rvw.Solution_Rmk, dbo_RA_Corp_Panel_Rvw.Determntn_ID,
dbo_RA_Corp_Panel_Rvw.Dt_Response, Now() AS Expr1
FROM (dbo_RA LEFT JOIN dbo_iro ON dbo_RA.RA_ID = dbo_iro.RA_ID) LEFT JOIN
dbo_RA_Corp_Panel_Rvw ON dbo_RA.RA_ID = dbo_RA_Corp_Panel_Rvw.RA_ID
WHERE dbo_RA.RA_ID=[Forms]![frmRoute_RA]![txtRAID];
 

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