SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO



CREATE procedure [dbo].[p_test_cl_bdr_delete]
as

	set nocount on;

	-- suppression des bordereaux crédit sinistres 

	delete	a
	from	acc_cl_bordereaux_accounts_details a
			inner join acc_cl_bordereaux_accounts ba on ba.clba_account_id = a.clbad_account_id
	
	delete acc_cl_bordereaux_accounts

	delete	a
	from	acc_accounts a
	where	a_type_code = 'CB'

	
	delete acc_cl_bordereaux_companies
	delete acc_cl_bordereaux_variables
	delete acc_cl_bordereaux



GO
