Subject | Re: [IBO] Updating left outer join |
---|---|
Author | Helen Borrie |
Post date | 2006-06-05T11:57:17Z |
At 09:42 PM 5/06/2006, you wrote:
select s.rec,s.shipment,s.whs,s.pid,s.qty,s.alloc,w.description
from warehouses w
left outer join shipment_allocations s
on s.whs=w.ref
WHERE s.shipment=:shipment and s.pid=:pid
Helen
>HiTry improving the syntax for the main query:
>
>I have this query connected to a grid
>
>select s.rec,s.shipment,s.whs,s.pid,s.qty,s.alloc,w.description
>from (warehouses w left outer join shipment_allocations s
> on s.whs=w.ref and s.shipment=:shipment and s.pid=:pid)
>
>in the EditSQL I have
>
>execute procedure shipment_alloc_edit(:shipment,:pid,:qty,:whs)
>
>:shipment comes from MasterParams and MasterSource
>:qty is entered in the grid
>:pid is set in code AfterPrepare (ParamByName)
>:whs is one of the fields extracted in the SQL
>
>When I look at the SQLMonitor I see that when the query is opened both
>:shipment and :pid are correctly set. However when the InsertSQL is
>executed :shipment and :qty are set, but :pid and :whs are null.
>
>How can I persuade it to pick up :pid and :whs?
select s.rec,s.shipment,s.whs,s.pid,s.qty,s.alloc,w.description
from warehouses w
left outer join shipment_allocations s
on s.whs=w.ref
WHERE s.shipment=:shipment and s.pid=:pid
Helen