Sql server 无法使用别名命名我的子查询

Sql server 无法使用别名命名我的子查询,sql-server,subquery,alias,Sql Server,Subquery,Alias,很抱歉,我现在得到的错误是:为“A1”多次指定了列“ProductId”。请尝试更改: select * from ( (select * FROM product_min_max_level (NOLOCK) INNER JOIN dm_Product (NOLOCK) ON product_min_max_level.Productid=dm_Product.Productid AND dm_Product.KanbanFlag=1 --AND rw=1 IN

很抱歉,我现在得到的错误是:为“A1”多次指定了列“ProductId”。

请尝试更改:

select * from (
(select * FROM product_min_max_level (NOLOCK)
        INNER JOIN dm_Product (NOLOCK) ON product_min_max_level.Productid=dm_Product.Productid AND dm_Product.KanbanFlag=1 --AND rw=1
        INNER JOIN dm_WarehouseLocation (NOLOCK) ON dm_warehouselocation.LocationID=product_min_max_level.LOCATIONID
        LEFT JOIN ft_PickDemand_open (NOLOCK) ON ft_PickDemand_Open.PRODUCTID=product_min_max_level.PRODUCTID AND product_min_max_level.LOCATIONID=ft_PickDemand_Open.TOWAREHOUSELOCATIONID
        where dm_product.productno not in
            (select dm_product.ProductNo from product_min_max_level (NOLOCK) 
            INNER JOIN dm_Product  (NOLOCK) ON dm_product.ProductId=product_min_max_level.Productid AND dm_product.KanbanFlag=1
            INNER JOIN dm_WarehouseLocation (NOLOCK) ON dm_WarehouseLocation.LocationID=product_min_max_level.LOCATIONID
            inner join
            (SELECT  DetailPart,GroupName,RootBOMPart,EffectiveStartDate,EffectiveEndDate
            FROM dl_MBOM (NOLOCK) ) bom2
             ON (bom2.DetailPart+bom2.GroupName)=(dm_product.ProductNo+dm_WarehouseLocation.WorkCenter)
            WHERE (product_min_max_level.Route = 77))))A1


发布错误消息。“A1”附近的语法不正确,但A1之后或之前是否有内容(select*?嘿,我编辑了帖子。请现在查看。使用select语句后,我的错误更改为:为“A1”多次指定了列“ProductId”。
(select * 
(select product_min_max_level.*
        , dm_Product.*
        , dm_WarehouseLocation.*
        , ft_PickDemand_open.*