Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Balance amt using SQL from Parent-Child and GrandMaster
Message
 
À
07/12/2004 02:07:21
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:
00967409
Vues:
19
Hi Dorin

>You can use
>FOR SELECT ... INTO ... DO BEGIN
>    ...statements or another FOR SELECT INTO
>END
>in stored procedures with input and output parameters to process rows as in VFP SCAN/ENDSCAN and in the same time return rows to client.
>
>You can even dynamically construct those SELECT statements based on table names passed as parameters and then use
>
FOR EXECUTE STATEMENT {cDynamicSQL} INTO ... DO BEGIN
>    ...statements or another FOR SELECT INTO
>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.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform