[firebase-br] Stored procedures

André Barros andresalbarros em gmail.com
Sex Ago 21 19:50:00 -03 2009


Amigos:
Eu estou como alguns ja sabem a começar a trabalahr com o Firebird e estou
neste momento a transformar ou a tentar pelo menos um banco MSSQL em
Firebird, neste moemnto deparo-me com um problema que é algumas das stored
procedures que em verdade não sei como converter-las a firebird de forma
eficaz abaixo deixo-vos um exemplo de uma das SP que tenho para converter e
que não consegui

agradeço a ajuda de todos.

André



SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[Sp_BuscaDetalles]') and OBJECTPROPERTY(id,
N'IsProcedure') = 1)
drop procedure [dbo].[Sp_BuscaDetalles]
GO

CREATE       Procedure Sp_BuscaDetalles
(
@NUMTRANS char(60)
)
as
begin transaction
if @@error<>0
   begin
rollback transaction
return -1
   end

SELECT NUMTRANS ,NUMFILA,CANTIDAD,CODART,DESCRIPART,IVA,CLASE,PRCUNITFULL
,PRCUNIAFIL , PRECIOFULL
       , IVAFULL, PRCAFIL, IVAAFIL, PORCDESC, MTODESC, SUBTOTAL, SUBIVA,
MTONETO,COSTOUNIT FROM DETFACTMP
       WHERE NUMTRANS = @NUMTRANS ORDER BY CONVERT(NUMERIC,NUMFILA) ASC
if @@error<>0
begin
rollback transaction
return -1
end
commit transaction
return

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO



Mais detalhes sobre a lista de discussão lista