From PL, 4 Years ago, written in Plain Text.
">
A PHP Error was encountered
Severity: Notice
Message: Trying to access array offset on value of type bool
Filename: view/view.php
Line Number: 33
from
A PHP Error was encountered
Severity: Notice
Message: Trying to access array offset on value of type bool
Filename: view/view.php
Line Number: 33
-
view diff
Embed
CREATE PROCEDURE webApi.spGetPatientsWithMedicamentsFromProductGroup @ProductGroupId INT, @Date DATE
AS
;WITH cte AS (
SELECT ppg.PatientProductGiveId, ppg.PatientId, p.ProductId, p.[FullName], ppg.QuantityGive, SUM(ISNULL(ppgd.QuantityDone,0)) as QuantityDoneGive, SUM(ISNULL(ppgd.QuantityDoneLost,0)) as QuantityDoneLost
FROM dbo.PatientProductGive ppg
JOIN vwProduct p ON ppg.ProductId = p.ProductId
LEFT JOIN dbo.PatientProductGiveDone ppgd ON ppg.PatientProductGiveId = ppgd.PatientProductGiveId
WHERE ppg.ProductGroupId = @ProductGroupId AND CAST(ppg.GiveDate AS DATE) = @Date
GROUP BY ppg.PatientId,
ppg.PatientProductGiveId,
p.ProductId,
p.FullName,
ppg.QuantityGive
)
SELECT c.PatientProductGiveId, vppg.PatientId, vppg.FirstName, vppg.LastName, c.ProductId, c.FullName, (c.QuantityGive - c.QuantityDoneGive - c.QuantityDoneLost) as Quantity
FROM cte c
JOIN dbo.vwPatientProductGroup vppg ON c.PatientId = vppg.PatientId
WHERE vppg.ProductGroupId = @ProductGroupId AND vppg.DischargeDate IS NULL;
Replies to Re: Untitled
Title |
Name |
Language |
UNIX |
When |
Re: Re: Untitled |
Reliable Owl |
text |
1563889993 |
4 Years ago. |
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}