SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2010
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MS SQL -- The multi-part identifier "xxx" could not be bound.

    Hey,

    I'm trying to run a query but it's giving me an error of:

    Msg 4104, Level 16, State 1, Line 9
    The multi-part identifier "Part.PartNum" could not be bound.
    Msg 4104, Level 16, State 1, Line 4
    The multi-part identifier "Part.Description" could not be bound.
    I'm not sure why this is coming up. I normally don't do things in MS SQL but I had no choice for this project.

    Code MySQL:
    SELECT Rep.LastName,
    	   Part.Description
    FROM Rep
    INNER JOIN Customer
    	ON Rep.RepNum = Customer.RepNum
    INNER JOIN OrderLine
    	ON OrderLine.PartNum = Part.PartNum

    Any help please!

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,021
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    you're referencing columns of a table (Part) that isn't mentioned in the FROM clause

    the tables mentioned in the FROM clause are Rep, Customer, and OrderLine
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •