IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[order_171_1_download]') AND type = 'P')
DROP PROCEDURE [dbo].[order_171_1_download]
GO
CREATE  procedure order_171_1_download(
@cmpid int ,
@ordid bigint) 
as 
begin 
set nocount on
select * from order_171_1 order by ord2_order , ord2_id 
set nocount off 
end