>I have copied the SQL below,
>
>SELECT Oimods.iid, Oimods.ioitemid, Oimods.imodid, Oimods.ipricegpid,;
> Order.order_no, Order.cticket, Oimods.ctktname, Oimods.iinvid,;
> Oimods.laddtobase, Oimods.nprice, Oimods.iqty, Oimods.cfraction,;
> Oimods.cmodified;
> FROM prism!oimods INNER JOIN prism!oitems;
> INNER JOIN prism!order ;
> ON Oitems.iorderid = Order.iid ;
> ON Oimods.ioitemid = Oitems.iid;
> WHERE Order.order_no = ?vp_order_no;
> ORDER BY Oimods.ioitemid, Oimods.imodid
>
John,
So when you look at the result from the view, how is it ordered? It looks like you want to order by line item ID (Oimods.ioitemid {integer order item ID}) and then modification ID (Oimods.imodid {integer mod ID}).
If imodID is the primary key of the modification table then it looks like it would order things sequentially. PKs are generated as the record is inputed. If there is a PK generattin algorithm, it probably takes takes the preceeding key, increments it and returns the new value. So anything in PK order would be in sequential order. What order do you want it in: alphabetic by mod name (e.g. Pep, Mushroom or do you have a sequence order to display modifications (e.g. Pep goes before sausage because the ingedients are in that order).
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao