灵活的搜索问题 SAP Hybris

Flexible Search Issue SAP Hybris

我对灵活查询有疑问。这是我的查询:

Select
{pp.productCode} as 'Code',
{p.descriptionCics} as 'Desc CISC',
{bs.uid} as 'Store',
{evo.code} as 'Status', 
{p.department} as 'Department', 
{pca.name} as 'Category',
{p.grm} as 'GRM',
{p.buyerCode} as 'Code Buyer',
{p.buyerids} as 'Buyer', 
{ps.planogramCode} as 'Code Planogram',
{pca.categoryCode} as 'Category Planogram',
{s.puvmBlock} as 'Blocked',
(CASE WHEN ({p.productDetailTypeList} is not null )THEN 'YES' else 
'NO' END) as 'IMAGE'
from 
{ 
Product as p
JOIN PlanogramProducts as pp on {p.code} = {pp.productCode}
JOIN StockLevel as s on {pp.productCode} = {s.productCode}
JOIN EnumerationValue as evo on {p.status} = {evo.pk}
JOIN PlanogramCategory as pc on {pp.planogramCode} = 
 {pc.planogramCode}
JOIN PlamnogramCategoryAnag as pca on {pc.categoryCode}= 
{pca.categoryCode}
JOIN BaseStore as bs JOIN PlanogramStore as ps on {bs.storeRef} = 
{ps.storeRef} AND {bs.bramchOffice} = {ps.branchOffice}
}
WHERE 1=1

这是我执行时的错误:

有人可以帮助我吗?非常感谢。

您的陈述有误。您使用 planogramStore 加入 basestore。但是 planogram store 和 basestore 都没有与您的查询的任何其他部分连接。您需要将 basestore 或 planogramstore 与其他表之一连接起来。

现在您的 from 语句中有 2 个分离的部分,这就是您收到错误的原因

Product as p
JOIN PlanogramProducts as pp on {p.code} = {pp.productCode}
JOIN StockLevel as s on {pp.productCode} = {s.productCode}
JOIN EnumerationValue as evo on {p.status} = {evo.pk}
JOIN PlanogramCategory as pc on {pp.planogramCode} = 
 {pc.planogramCode}
JOIN PlamnogramCategoryAnag as pca on {pc.categoryCode}= 
{pca.categoryCode}

JOIN BaseStore as bs JOIN PlanogramStore as ps on {bs.storeRef} = 
{ps.storeRef} AND {bs.bramchOffice} = {ps.branchOffice}

您需要在这两个部分之间进行连接才能获得正确的数据