Hej!
Jag håller på att byta databas och skriver därmed om mina sidor...
Har följande kod som fungerade fint med access:
SELECT DISTINCT
tblArticle.articleNumber,
tblArticle.articleName,
tblArticle.articleUnit,
tblPrice.articlePrice,
tblSupplier.SupplierName,
tblPrice.articleCategoryNumber,
tblDiscount.articleDiscount,
iif(articleDiscount is null, articlePrice, articlePrice*(1-([articleDiscount]*0.01))) AS articlePriceWithDiscount
FROM ((tblArticle
INNER JOIN tblPrice ON tblArticle.articleNumber = tblPrice.articleNumber)
LEFT JOIN tblDiscount ON tblPrice.articleCategoryNumber = tblDiscount.CategoryNumber)
INNER JOIN tblSupplier ON tblPrice.articleSupplierId = tblSupplier.SupplierId
WHERE " & sOption & " AND tblSupplier.SupplierId IN (" & sCheckedSuppliers & ")
ORDER BY " & sOrder1 & ", " & sOrder2 & " ASC
När jag nu kör med SQL-server får jag fölajnde fel:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
Incorrect syntax near the keyword 'is'.
Vad beror detta på?
Mvh
Henrik