- Член од
- 1 февруари 2007
- Мислења
- 408
- Поени од реакции
- 15
Ова е кверито и за сите производи кои припаѓаат на повеке категории ги дава како посебни редови како да го ресам пробав со динстинкт ама не бива пробав со GROUP BY Product.Id mi vika
Column 'Product.Id' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
незнам што да правам
SELECT DISTINCT
Product.Id AS ID,
Product.Name AS Name,
Product.ShortDescription AS ShortDescription,
Product.Price As Price,
Product.Sku AS Barcode,
Manufacturer.Name AS Brand,
Category.Name AS Category,
Picture.SeoFilename,
Picture.MimeType
FROM Product
JOIN Product_Category_Mapping ON Product_Category_Mapping.ProductId = Product.Id
INNER JOIN Category ON Category.Id = Product_Category_Mapping.CategoryId
JOIN Product_Manufacturer_Mapping ON Product_Manufacturer_Mapping.ProductId = Product.Id
JOIN Manufacturer ON Manufacturer.Id = Product_Manufacturer_Mapping.ManufacturerId
JOIN Product_Picture_Mapping ON Product_Picture_Mapping.ProductId = Product.Id
JOIN Picture ON Picture.Id = Product_Picture_Mapping.PictureId
WHERE Sku IS NOT NULL
Column 'Product.Id' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
незнам што да правам
SELECT DISTINCT
Product.Id AS ID,
Product.Name AS Name,
Product.ShortDescription AS ShortDescription,
Product.Price As Price,
Product.Sku AS Barcode,
Manufacturer.Name AS Brand,
Category.Name AS Category,
Picture.SeoFilename,
Picture.MimeType
FROM Product
JOIN Product_Category_Mapping ON Product_Category_Mapping.ProductId = Product.Id
INNER JOIN Category ON Category.Id = Product_Category_Mapping.CategoryId
JOIN Product_Manufacturer_Mapping ON Product_Manufacturer_Mapping.ProductId = Product.Id
JOIN Manufacturer ON Manufacturer.Id = Product_Manufacturer_Mapping.ManufacturerId
JOIN Product_Picture_Mapping ON Product_Picture_Mapping.ProductId = Product.Id
JOIN Picture ON Picture.Id = Product_Picture_Mapping.PictureId
WHERE Sku IS NOT NULL
Attachments
-
4,3 MB Прегледи: 18
Последно уредено: