Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Balance amt using SQL from Parent-Child and GrandMaster
Message
De
07/12/2004 06:51:38
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
00966900
Message ID:
00967414
Vues:
19
This message has been marked as a message which has helped to the initial question of the thread.
Hi
It is not heavy, you only need stored procedure with input and output parameters

Something very simple
CREATE PROCEDURE TEST_PROC (
    IN_1 DOUBLE PRECISION,
    IN_2 DOUBLE PRECISION)
RETURNS (
    OUT_1 DOUBLE PRECISION)
AS
begin
    out_1 = case
               when ( in_1 > in_2 ) then in_1 - in_2
               when ( in_1 is null or in_2 is null) then 0
               else 0 end ;
  /* Procedure Text */
  suspend;
end
>Whoa, this is heavy for me <g>. Nay, I was just curious if I could send parameters and receive one value back for the select statement use, like we do for select's in VFP, something like:
>
>
SELECT MyUDF(t.Val1, t.Val2) AS RetValFld FROM MyDBF t ....
>
>FUNCTION MyUDF
>   LPARAMETERS tnV1, tnV2
>
>   ... lot of stuff here
>
>   RETURN lnRetVal
>ENDFUNC
>
>I just want to shift the CASE into the Stored Procedures (one for the Dr and other for Cr side) which will expect 2 values do this same CASE inside and return the end result that we already have. As this CASE will remain standard, I believe, for this and other table that I will be later adding.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform