insert into tbl_srch(bcode,fn,media_name,country_name,cate_desc,sec_desc,proddesc,branddesc,ad_desc)
select ads.bcode,ads.fn,media.med_desc as media_name,country.country_name,cate.cate_desc,sec.sec_desc,products.bdesc as proddesc,brd.bdesc as branddesc,ads.ad_desc
					from tbl_ads ads left join tbl_category cate	 on (ads.cate_code = cate.cate_code)
									 left join tbl_sec 		sec 	 on (ads.sec_code  = sec.sec_code)
									 left join tbl_labels 	grps 	 on (ads.group_code = grps.group_code and  grps.prod_code='00' and grps.brand_code='000')
									 left join tbl_labels 	products on (ads.group_code = products.group_code and  ads.prod_code=products.prod_code and products.brand_code='000')
									 left join tbl_labels 	brd 	 on (ads.group_code = brd.group_code and  ads.prod_code=brd.prod_code and left(ads.brand_code,3)=brd.brand_code and right(ads.brand_code,1)=brd.check_dig)
									 left join tbl_country  country  on (ads.country_cd = country.country_cd)
									 left join tbl_media	media	 on (ads.media_code = media.med_cd)
									 left join tbl_subm		submedia on (ads.media_code =submedia.med_cd and ads.submedia = submedia.sub_med)
									 left join tbl_typology typology on (media.type_code = typology.type_code)