SSMA无法将Access查询转换为视图

时间:2013-11-05 20:01:02

标签: sql sql-server ms-access

我想将查询转换为sql server上的视图。 SS Migration Assistant正在扼杀以下查询:

SELECT 
    FechInventory.ID AS skuID, 
    FechInventory.ItemNo, 
    IIf(InStr(3,[ItemNo],".")>0,Mid([ItemNo],3,InStr(1,[ItemNo],".")-3),InStr(3,[ItemNo],Len([ItemNo]))) AS ItemStyle,
    IIf(InStr(1,[ItemNo],"/")>0,Mid([ItemNo],InStr(1,[ItemNo],".")+1,InStr(1,[ItemNo],"/")-InStr(1,[ItemNo],".")-1),Mid([ItemNo],InStr(1,[ItemNo],".")+1,Len([ItemNo]))) AS Size1, 
    IIf(InStr(1,[ItemNo],"/")>0,Mid([ItemNo],InStr(1,[ItemNo],"/")+1,Len([ItemNo])-InStr(1,[ItemNo],"/")),"") AS Size2, 
    FechInventory.Desc, 
    FechInventory.Qty, 
    FechInventory.sCost, 
    [sCost]*0.18 AS gcCost, 
    [scost]*0.18*[qty] AS gcLineCost, 
    InStr(3,[ItemNo],".") AS FirstPeriod, 
    InStr(1,[ItemNo],"/") AS FirstSlash, 
    Len([ItemNo]) AS ItemNoLength, 
    FechInventory.Brand, 
    Brands.[Brand Name], 
    FechInventory.ProductType, 
    ProductTypes.ProductTypeName, 
    FechInventory.Gender, 
    Genders.GenderName, 
    FechInventory.Sleeve, 
    SleeveLengths.SleeveLength, 
    FechInventory.Color, 
    Colors.ColorName, 
    Fabrics.FabricTypeID, 
    Fabrics.FabricName
FROM 
    (
        Colors 
        RIGHT JOIN 
        (
            SleeveLengths 
            RIGHT JOIN 
            (
                Genders 
                RIGHT JOIN 
                (
                    (
                        FechInventory 
                        LEFT JOIN 
                        Brands 
                            ON FechInventory.Brand = Brands.BrandID
                    ) 
                    LEFT JOIN 
                    ProductTypes 
                        ON FechInventory.ProductType = ProductTypes.ProductTypeID
                ) 
                    ON Genders.GenderID = FechInventory.Gender
            ) 
                ON SleeveLengths.SleeveID = FechInventory.Sleeve
        ) 
            ON Colors.ColorID = FechInventory.Color
    ) 
    LEFT JOIN 
    Fabrics 
        ON FechInventory.FabricType = Fabrics.FabricTypeID
ORDER BY FechInventory.ItemNo;

它给出了这个错误:

  • SSMA错误消息:
  • A2SS0058:不支持以下SQL语句且无法转换:

是什么给出的?什么东西伸出来?

0 个答案:

没有答案