Hi,I'm having 2 tables namely handset_details and offers, handset_id is the primary key in handset_details table and foreign key in offers table,I now need to pick handsets which are present in both handset_details and offers table which are mapped to an offer_id primary key in offers table.i've written my query like this, but when it gets executed its showing DUPLICATES like printing the same record TWICE.can anyone please help me out, here is my query. set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgoALTER PROCEDURE [dbo].[usp_get_phones_by_make_ID] (@manufacturar_id int)AS select handset_details.handset_id, offer_details.offer_id, offer_details.tariff_detail_id, handset_details.handset_image_small, handset_details.handset_dec, handset_details.handset_weight_grams, handset_details.handset_length_cm, handset_details.handset_width_cm, handset_details.handset_breadth_cm, lkp_hardware_manufacturars.manufacturar_descFROM offer_details, handset_details, lkp_hardware_manufacturarsWHERE offer_details.handset_id = handset_details.handset_id AND lkp_hardware_manufacturars.manufacturar_id = @manufacturar_id AND handset_details.manufacturar_id = lkp_hardware_manufacturars.manufacturar_id
Awaiting your help, Many Thanks..