cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to Export data from two types in a single export item script?

Former Member
0 Likes
931

How to Export data from two types in a single export item script? i.e to combined base product and variant product using export script ?

Accepted Solutions (0)

Answers (1)

Answers (1)

VinayKumarS
Active Contributor
0 Likes

Hello Sandeep,

I have come across the same scenario earlier. below example might be useful for you.. it will retrieve the data from two tables...

 "#%impex.getImpExExportWriter().getExportWriter().setFieldseparator(',');"
 INSERT Order;code;discounts(code);discounts(currency(isocode));discounts(value)
  "#%impex.exportItemsFlexibleSearch(""select {o.pk} from {order as o join orderdiscountrelation as r on {o.pk}={r.source} join discount as d on {r.target}={d.pk}}"");"
 
0 Likes

technically your are retriving the data from 1 table only.. i too have same question..i want data from 3 tables ...any idea ??