on 2018 Apr 26 3:02 PM
Could you please help me to create “SuperCategory from the join of product and category model using Flexible Search Query
Request clarification before answering.
Hi Jakub, Thanks for your reply with explanation . Actually i have to add one column in the report which will display super categories of the product using join table of product and categories in Flexible search query . Thanks in advance ......
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish,
Since you haven't described what exactly you need I can give you only general query:
SELECT *
FROM {
Product as p JOIN CategoryProductRelation as rel
ON {p:PK} = {rel:target}
JOIN Category AS c
ON {rel:source} = {c:PK}
}
Hope this helps and Best Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Satish
For report you could use something like that:
SELECT {p:name[en]} AS ProductName, {other product fields needed in the report}, {c:name[en]} AS CategoryName
FROM {
Product as p JOIN CategoryProductRelation as rel
ON {p:PK} = {rel:target}
JOIN Category AS c
ON {rel:source} = {c:PK}
}
Best Regards,
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.