EXEMPLO_1212310
Database
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
XDATABAIXAPARCELAPAGAMENTOHST
Parameters
Name
Type
Mode
@CODCOLIGADA
smallint
IN
@IDLAN
int
IN
@STATUSLAN
int
IN
@IDHISTORICO
int
IN
Definition
CREATE FUNCTION XDATABAIXAPARCELAPAGAMENTOHST( @CODCOLIGADA SMALLINT, @IDLAN INT, @STATUSLAN INT, @IDHISTORICO INT ) RETURNS DATETIME AS BEGIN DECLARE @DATALIQUIDACAO DATETIME SELECT @DATALIQUIDACAO = ISNULL(FLANHST.DATACHEQUE, FLANHST.DATABAIXA) FROM FLANHST (NOLOCK) WHERE FLANHST.CODCOLIGADA = @CODCOLIGADA AND FLANHST.IDLAN = @IDLAN AND FLANHST.IDHISTORICO = @IDHISTORICO RETURN @DATALIQUIDACAO END