SQL Reporting

31 views
Skip to first unread message

Benevo

unread,
Jul 6, 2025, 11:12:10 PMJul 6
to XMPie Interest Group
Hi,

I'm working on building a report that will help us track the items we've assigned to product profiles. 

I'm at a point where I'm not really sure where to find the data. Idealistically I would like a list of each item and the name of which product profile it's assigned to. 

Any help would be great, or even some more information on how the product profiles are built, as I can tell there's no obvious reference table to Product Profiles that just gives me what im looking for.

Thanks!

couch

unread,
Jul 6, 2025, 11:49:09 PMJul 6
to XMPie Interest Group
Rushed and untested, but I think this might help you in the right direction:

SELECT DISTINCT Product.ProductID, ProdCulture.Name AS ProductName, ProfCulture.ProductID AS ProfileID, ProfCulture.Name AS ProfileName
FROM Product_Culture AS ProfCulture INNER JOIN
  ProductProfileDependency AS PPD ON ProfCulture.ProductID = PPD.ProfileID INNER JOIN
  Product INNER JOIN
  Product_Culture AS ProdCulture ON Product.ProductID = ProdCulture.ProductID ON PPD.ProductID = Product.ProductID
WHERE (Product.ProductID IN
  (SELECT DISTINCT ProductProfileDependency_1.ProductID
      FROM Product AS Product_1 INNER JOIN
      ProductProfileDependency AS ProductProfileDependency_1 ON Product_1.ProductID = ProductProfileDependency_1.ProfileID
      WHERE (Product_1.IsProfile = 1)
  )
)

Benevo

unread,
Jul 7, 2025, 1:15:51 AMJul 7
to XMPie Interest Group
Wow Thanks Couch!

I've been scratching my head for longer than im willing to admit on this lol

Appreciate the help.

Reply all
Reply to author
Forward
0 new messages