Last active
February 9, 2022 11:02
-
-
Save fourgeotf/d9851064b29ef236ce3e616c059a5ecd to your computer and use it in GitHub Desktop.
[CIMPRODUCT - Fonctions Scalaires] Fonctions scalaires #cimproduct #sql #fonctions_scalaires
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [Cimprod_Mithieux] | |
GO | |
/****** Object: UserDefinedFunction [dbo].[F_VerifClotureOF] Script Date: 09/02/2022 11:46:41 ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE FUNCTION [dbo].[F_VerifClotureMetaOF] ( | |
@IdMetaOF int | |
) | |
RETURNS bit | |
BEGIN | |
DECLARE @Result bit | |
SELECT @Result = MIN(CAST([OF].Cloture AS int)) FROM [OF] WHERE [OF].IdMetaOF = @IdMetaOF GROUP BY [OF].IdMetaOF | |
RETURN ISNULL(@Result, 0) | |
END | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [Cimprod_Mithieux] | |
GO | |
/****** Object: UserDefinedFunction [dbo].[F_VerifClotureOF] Script Date: 09/02/2022 12:02:08 ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE FUNCTION [dbo].[F_VerifClotureOF] ( | |
@IdOF int | |
) | |
RETURNS bit | |
BEGIN | |
DECLARE @Result bit | |
SELECT @Result = MIN(CAST(OFOperation.Cloture AS int)) FROM OFOperation WHERE OFOperation.IdOF = @IdOF GROUP BY OFOperation.IdOF | |
RETURN ISNULL(@Result, 0) | |
END | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment