#Deleted In Query Results (1 Viewer)

Matty

...the Myth Buster
Local time
Today, 14:37
Joined
Jun 29, 2001
Messages
396
Hi,

I'm trying to run a query with serveral left joins and I'm getting #deleted in some of my results. Here's what I'm trying to do:

I have a table called dbo_RA (PK named RAID). There are 4 other tables -- tblCheckIn, dbo_Quote, dbo_WorkOrder, and dbo_RACancellation (All with RAID as a foreign key). I've basically written a query that shows all records from dbo_RA and any results from the other 4 queries using left joins. It works nicely until I add the fourth query, dbo_RACancellation.

When I add that table to the query, it shows #deleted in the results from dbo_WorkOrder if that data was previously null (meaning there isn't a Work Order record for that RAID). If I remove the RACancellation table, it's fine again.

What could be causing it to show #deleted? I haven't deleted any records from dbo_WorkOrder, so does anyone know what I can try?
 

rockman

Senior Member
Local time
Today, 12:37
Joined
May 29, 2002
Messages
190
Post your SQL statement so that we may have a look.

Jeff
 

Matty

...the Myth Buster
Local time
Today, 14:37
Joined
Jun 29, 2001
Messages
396
Here's the pre-join SQL:

SELECT dbo_RA.RAID, dbo_CheckIn.CheckInID, dbo_Quotes.QuoteID, dbo_Quotes.QuoteStatusID, dbo_Quotes.ReturnDate AS QuoteReturnDate, dbo_WorkOrder.WOID, dbo_WorkOrder.ReturnDate AS WOReturnDate
FROM ((dbo_RA LEFT JOIN dbo_CheckIn ON dbo_RA.RAID = dbo_CheckIn.RAID) LEFT JOIN dbo_Quotes ON dbo_RA.RAID = dbo_Quotes.RAID) LEFT JOIN dbo_WorkOrder ON dbo_RA.RAID = dbo_WorkOrder.RAID;


And here's the post-join SQL:

SELECT dbo_RA.RAID, dbo_CheckIn.CheckInID, dbo_Quotes.QuoteID, dbo_Quotes.QuoteStatusID, dbo_Quotes.ReturnDate AS QuoteReturnDate, dbo_WorkOrder.WOID, dbo_WorkOrder.ReturnDate AS WOReturnDate, dbo_RACancellation.RACancellationID
FROM (((dbo_RA LEFT JOIN dbo_CheckIn ON dbo_RA.RAID = dbo_CheckIn.RAID) LEFT JOIN dbo_Quotes ON dbo_RA.RAID = dbo_Quotes.RAID) LEFT JOIN dbo_WorkOrder ON dbo_RA.RAID = dbo_WorkOrder.RAID) LEFT JOIN dbo_RACancellation ON dbo_RA.RAID = dbo_RACancellation.RAID;
 

Users who are viewing this thread

Top Bottom