J
jason
I have duplicates returned in the following query. Is it possible to refine
this query to remove the duplicates or prevent duplicates from occuring
without disrupting the query?
PARAMETERS ListingsID Long;
SELECT tblListings.ListingsID, tblListings.Insertion_Date, tblListings.Code,
tblListings.Condition, tblListings.Status, tblCompany.Company,
tblListings.Name, tblListings.Name_Client, tblModel.Model,
tblListings.Size_ID, tblListings.Hull_Number, tblListings.Year,
tblYacht_Type.Yacht_Type, tblListings.Original_Price,
tblListings.Current_Price, tblListings.Status_Price_Reduced,
tblListings.Price_Reduction_Date, tblLocation_Status.Location_Status,
tblListings.Marina, tblState.State, tblCountry.Country,
tblListings.Listing_Broker_ID, tblListings.Date_viewable,
tblListings.Comments, tblListings.Link, tblListings.Closing_Date,
tblSource.Source, tblListings.Image1, tblListings.Image2,
tblListings.Image3, tblListings.Status_Charter
FROM (tblCompany
INNER JOIN (tblSource
INNER JOIN (tblYacht_Type I
NNER JOIN (tblCountry
INNER JOIN (tblState
INNER JOIN (tblLocation_Status
INNER JOIN (tblModel
INNER JOIN tblListings
ON tblModel.ModelID = tblListings.Model_ID)
ON tblLocation_Status.Location_StatusID = tblListings.Location_Status_ID)
ON tblState.StateID = tblListings.State_ID) ON tblCountry.CountryID =
tblListings.Country_ID)
ON tblYacht_Type.YachtTypeID = tblListings.Yacht_Type_ID)
ON tblSource.SourceID = tblListings.Source_ID) ON (tblCompany.CompanyID =
tblListings.Company_ID)
AND (tblCompany.CompanyID = tblListings.Company_ID))
LEFT JOIN tblPriceReduction
ON tblListings.ListingsID = tblPriceReduction.Listings_ID
WHERE (([ListingsID] Is Null Or [tblListings].[ListingsID]=[ListingsID]));
this query to remove the duplicates or prevent duplicates from occuring
without disrupting the query?
PARAMETERS ListingsID Long;
SELECT tblListings.ListingsID, tblListings.Insertion_Date, tblListings.Code,
tblListings.Condition, tblListings.Status, tblCompany.Company,
tblListings.Name, tblListings.Name_Client, tblModel.Model,
tblListings.Size_ID, tblListings.Hull_Number, tblListings.Year,
tblYacht_Type.Yacht_Type, tblListings.Original_Price,
tblListings.Current_Price, tblListings.Status_Price_Reduced,
tblListings.Price_Reduction_Date, tblLocation_Status.Location_Status,
tblListings.Marina, tblState.State, tblCountry.Country,
tblListings.Listing_Broker_ID, tblListings.Date_viewable,
tblListings.Comments, tblListings.Link, tblListings.Closing_Date,
tblSource.Source, tblListings.Image1, tblListings.Image2,
tblListings.Image3, tblListings.Status_Charter
FROM (tblCompany
INNER JOIN (tblSource
INNER JOIN (tblYacht_Type I
NNER JOIN (tblCountry
INNER JOIN (tblState
INNER JOIN (tblLocation_Status
INNER JOIN (tblModel
INNER JOIN tblListings
ON tblModel.ModelID = tblListings.Model_ID)
ON tblLocation_Status.Location_StatusID = tblListings.Location_Status_ID)
ON tblState.StateID = tblListings.State_ID) ON tblCountry.CountryID =
tblListings.Country_ID)
ON tblYacht_Type.YachtTypeID = tblListings.Yacht_Type_ID)
ON tblSource.SourceID = tblListings.Source_ID) ON (tblCompany.CompanyID =
tblListings.Company_ID)
AND (tblCompany.CompanyID = tblListings.Company_ID))
LEFT JOIN tblPriceReduction
ON tblListings.ListingsID = tblPriceReduction.Listings_ID
WHERE (([ListingsID] Is Null Or [tblListings].[ListingsID]=[ListingsID]));