3 Replies Latest reply on Sep 17, 2008 12:45 PM by jeffb1

    Problem with my SQL script- selection from multiple tables

    656327
      Hi all. I'm trying to execute the following script:
      SELECT cus_lname, cus_fname, product_code, v_name
           FROM customer, order_detail, cus_order, vendor
           WHERE (customer.cus_code = cus_order.cus_code) and (cus_order.order_code = order_detail.order_code)
           and (order_detail.product_code = product.p_code) and (product.v_code = vendor.v_code)
      and I get:

      "Msg 4104, Level 16, State 1, Line 3
      The multi-part identifier "PRODUCT.P_CODE" could not be bound.
      Msg 4104, Level 16, State 1, Line 3
      The multi-part identifier "PRODUCT.V_CODE" could not be bound."

      as an error. Any tips on how to solve it? Thanks