Skip to Content
0
Jun 11, 2020 at 11:35 AM

Impex export data from multiple tables

283 Views

"#% impex.setTargetFile( ""Catalog.csv"" , true );" ISERT_UPDATE Catalog; pk; shortdescription; code; price; qv; cv; wholesale; "#% impex.exportItemsFlexibleSearch(""SELECT {c.pk}, {p.shortdescription}, {p.code}, {pr.price}, {pr.qv}, {pr.cv}, {pr.wholesale}, {pr.taxableprice} FROM {CATALOG AS c JOIN PRODUCT AS p on {c.pk} = {p.catalog} JOIN PRICEROW as pr ON {p.pk} = {pr.product} JOIN CATALOGVERSION as cv ON {p.catalogversion} = {cv.pk} JOIN USERPRICEGROUP AS ug on {pr.ug} = {ug.pk} JOIN CATEGORY as ct ON {c.pk} = {ct.catalog}} WHERE {c.id} = 'usProductCatalog' AND {cv.version} = 'Online' GROUP BY {p.code}"");"