VbzCart/docs/queries/qryRpt Pkg Lines: Difference between revisions

From Woozle Writes Code
< VbzCart‎ | docs‎ | queries
Jump to navigation Jump to search
imported>Woozle
(copied, not tested)
 
imported>Woozle
(returns data now; accuracy not tested)
Line 9: Line 9:
   p.ID_Pkg,
   p.ID_Pkg,
   o.Seq,
   o.Seq,
   iif(o.CatNum IS NULL,i.CatNum,o.CatNum) AS CatNum,
   IFNULL(o.CatNum,i.CatNum) AS CatNum,
   iif(o.Descr IS NULL,i.Descr,o.Descr) AS Descr,
   IFNULL(o.Descr,i.Descr) AS Descr,
   o.QtyOrd,
   o.QtyOrd,
   p.QtyShipped,
   p.QtyShipped,
Line 25: Line 25:
   qryCat_Items AS i ON p.ID_Item=i.ID;</mysql>
   qryCat_Items AS i ON p.ID_Item=i.ID;</mysql>
<section end=sql />
<section end=sql />
This has not yet been modified to work with MySQL.

Revision as of 16:43, 31 May 2011

About

SQL

<section begin=sql /><mysql>CREATE OR REPLACE VIEW qryRpt_Pkg_Lines AS SELECT

 p.ID AS ID,
 p.ID_Pkg,
 o.Seq,
 IFNULL(o.CatNum,i.CatNum) AS CatNum,
 IFNULL(o.Descr,i.Descr) AS Descr,
 o.QtyOrd,
 p.QtyShipped,
 p.QtyExtra,
 p.QtyNotAvail,
 p.QtyKilled,
 o.Price,
 o.ShipItm,
 o.ShipPkg,
 i.ID_Title

FROM (

 ord_pkg_lines AS p LEFT JOIN
 ord_lines AS o ON p.ID_OrdLine=o.ID) LEFT JOIN
 qryCat_Items AS i ON p.ID_Item=i.ID;</mysql>

<section end=sql />