'='附近的错误...帮助我如何删除它

时间:2013-11-23 01:55:08

标签: sql

CREATE PROCEDURE dbo.StoredProcedure35
    @Deal_ID int
AS
    select
        d.Deal_Price,
        i.Item_Name
    from
        Deals d,
        Items i,
        DealItemRelation r
    where
        d.Deal_ID = r.Deal_ID
        &
        i.Item_ID = r.Item_ID
        &
        d.Deal_ID = @d.Deal_ID

1 个答案:

答案 0 :(得分:0)

&替换为AND

CREATE PROCEDURE dbo.StoredProcedure35 @Deal_ID int 
AS SELECT d.Deal_Price,i.Item_Name FROM Deals d,Items i,DealItemRelation r 
   WHERE d.Deal_ID=r.Deal_ID AND i.Item_ID=r.Item_ID AND d.Deal_ID=@Deal_ID