Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
No MS-SQL eu tinha esse comando para criar uma procedure e preciso fazer funcionar no ACCESS. alguém me ajuda?
CREATE PROCEDURE p_Count_Interf
(@CMM char(1), @JZZ char(1), @BTR nvarchar(2), @CTR nvarchar(2))
AS
SET NOCOUNT ON
If @CMM = '1'
select count(contador) as Tot_Int from wCamisa1
Where (Interf='S' or Interf='R') and Juiz = @JZZ and Bateria= @BTR and Categoria= @CTR
Else If @CMM = '2'
select count(contador) as Tot_Int from wCamisa2
Where (Interf='S' or Interf='R') and Juiz = @JZZ and Bateria= @BTR and Categoria= @CTR
Else If @CMM = '3'
select count(contador) as Tot_Int from wCamisa3
Where (Interf='S' or Interf='R') and Juiz = @JZZ and Bateria= @BTR and Categoria= @CTR
Else If @CMM = '4'
select count(contador) as Tot_Int from wCamisa4
Where (Interf='S' or Interf='R') and Juiz = @JZZ and Bateria= @BTR and Categoria= @CTR
Else If @CMM = '5'
select count(contador) as Tot_Int from wCamisa5
Where (Interf='S' or Interf='R') and Juiz = @JZZ and Bateria= @BTR and Categoria= @CTR
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
Carregando comentários...