SQL Query

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
I have a bit of a complex query, wanting to fetch via direct sql :

Product ID, Title , Owner,  Data2, Data3


Product ID and Title reside normally in : Nop_Product

-------------------------------------------

Owner, uses mapping that can be queried by main ProductID via - Product_Owner_Mapping

ie : Select * from Product_Owner_Mapping WHERE ProductID = ''  (main product ID in original query)

This gives us OwnerID, which in turn can be mapped to Name field in another table, aptly named OwnerId


------------------------------------------

Data2 and Data3 are normal Specification Fields

Nop_Product_Specification_Mapping ProductID gives us SpecificationAttributeOptionID for each specific product

Which in turn gives us Nop_Specification_AttributeOption Name

We only need to match each product specification to a name Where Specification_AttributeID is equal to 14 or 19

This is an older install of nopcommerce  - 1.9
6 years ago
Not sure what the question is, but it sounds like you want to inner join the two tables since you only want specific records returned.  Or, you can left join them using the HAVING clause.

If you want SQL-specific questions, check out stackoverflow.com.  It's pretty much the best place to get answers to coding questions.
6 years ago
Thanks Lecher, yes - I am very well versed with stackoverflow.

I figured since this was nop specific this might be a better fit - but in retrospect -  you're probably right : more sql experts there of course.

Tx!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.