Syntax error in SQL Statement when executing SPROC

  • on line 7 there's a space inside "Purchasing _v_Line_Item_e" between "Purchasing" and "_v_Line_Item_e", resulting a double alias.

    if the tablename has a space, it needs to be bracketed: [Purchasing _v_Line_Item_e]

    otherwise remove teh extra space.

    you still have to fix that AND statement i identified earolier:, which will be your next error

    AND (@Part_Type_MP = ,, OR (CHARINDEX(, + CAST(P.Part_Type as VARCHAR(50)) + ,, @Part_Type_MP) >0))

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply