Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conversion of views from VFP5 to VFP9 - Group by invalid
Message
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 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01183326
Message ID:
01183479
Vues:
21
>> Are 'RdyToShip' and 'ProdQty' tables or views/cursors?
>
>They are both views:
>RdyToShip is not updateable, therefore I do not understand why that field is updatable in the previous view defn.
>(It consists of 2 fields - invoiceNo and a sum(invoiceqty) as rdytoship... from a table called invprod)
>
>ProdQty is not updatable either, but it has the group by issue as the first query...
>i.e.
>Select orderid,SUM(TotOrdered) as TotOrdered,;
>SUM(TotAllocated) as TotAllocated,Sum(TotShipped) as TotShipped,;
>SizeQty.SpecialOrd ;
>From SizeQty ;
> Group by orderid
>
>SizeQty is another view that is not updatable either, but has the group by issue as above...
>i.e.
>Select Ordprod.orderid,Ordsize.orderprodid, ; Sum(Ordsize.ordered) as TotOrdered, ; SUM(Ordsize.allocated) as TotAllocated, ; SUM(Ordsize.Shipped) as TotShipped, ;
> OrdHead.SBO as SpecialOrd ;
>From Ordsize,Ordprod,OrdHead ;
>Where Ordprod.orderprodid=Ordsize.orderprodid ;
>And OrdProd.OrderId =OrdHead.OrderID ;
>Group by Ordsize.orderprodid
>
>OrdHead,OrdPRod,OrdSize are all tables
>
>as stated, the more I dig, he more complex it gets...
>
>Thanks,
>Mike

As you may see both views have the same problem with Group clause. For example, first view field list contains Ordprod.orderid and OrdHead.SBO; it is disallowed in VFP9. If you really want to preserve this strange design (assuming it works properly) then you can either user SET ENGINEBEHAVIOR command, or use e.g. MAX(Ordprod.orderid),MAX(OrdHead.SBO)
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform