Skip to Content
4
Former Member
Dec 31, 2018 at 05:08 PM

Subselect in the context of a LEFT JOIN

342 Views

I am trying to execute the following query:

 SELECT *
 FROM {
     Product as p
  
     LEFT JOIN PriceRow AS prWeb on 
         {prWeb:product} = {p:PK} AND 
         {prWeb:ug} IN ({{ SELECT {thpg:pk} FROM {UserPriceGroup as thpg} WHERE {thpg:code} = 'web_price' }})
 }

It seams that the statement ({{ SELECT {thpg:pk} FROM {UserPriceGroup as thpg} WHERE {thpg:code} = 'web_price' }}) is not working in the context of a LEFT JOIN. Is this a restriction in hybris or it is an error in the syntax

I need this query in order to build a custom report, so executing a query before the join seems to not be an option in this case