Project

General

Profile

Bug #227 » query setelah diubah.txt

Muhammad Bintar, 03/16/2021 03:23 PM

 
1
/*DECLARE @EmployeeID VARCHAR(8) = '10000109' DECLARE @TreatmentType VARCHAR(8) = '06' DECLARE @MedicalFamily VARCHAR(8) = '' */ DECLARE @Now VARCHAR(20) SET @Now = ( SELECT FORMAT(GETDATE(), 'yyyyMMdd') ) DECLARE @HD VARCHAR(20)   SET @HD = ( SELECT DISTINCT HeaderSequence FROM    PHRPA0040 WHERE   EmployeeID = @EmployeeID AND StartDate <= @Now AND EndDate >= @Now ) IF @MedicalFamily = '' BEGIN SET @MedicalFamily = '0001' END SELECT  HeaderSequence , Sequence , Plafond , MedicalFamily FROM    dbo.PHRPA0041 WHERE   EmployeeID = @EmployeeID AND TreatmentType = @TreatmentType AND MedicalFamily = @MedicalFamily AND HeaderSequence = @HD 
(7-7/7)