How to get Category Name in SQL for Product?
Posted: Sat Dec 15, 2012 6:18 pm
Is there a way to join some tables to get the Category Name?
I was able to get the Manufacture name, but I can't see how to join the Category Table.
SELECT [ac_Products].[Name]
,[Price]
,[MSRP]
,ac_Manufacturers.Name as 'Manufacturer'
,[Sku]
,[ImageUrl]
,[Description]
,[VisibilityId]
FROM [super-v_store].[dbo].[ac_Products]
left JOIN ac_Manufacturers ON ac_Products.ManufacturerId = ac_Manufacturers.ManufacturerId
I was able to get the Manufacture name, but I can't see how to join the Category Table.
SELECT [ac_Products].[Name]
,[Price]
,[MSRP]
,ac_Manufacturers.Name as 'Manufacturer'
,[Sku]
,[ImageUrl]
,[Description]
,[VisibilityId]
FROM [super-v_store].[dbo].[ac_Products]
left JOIN ac_Manufacturers ON ac_Products.ManufacturerId = ac_Manufacturers.ManufacturerId