January 19, 2011 at 2:21 pm
Your SQL is invalid: The multi-part identifier "Ordersdetails.ProductCode" could not be bound.
Here was my Code
SECET
Orders.CustomerId,
Orders.Salesrep_Customerid,
Orders.Custom_field_vehicleinfo,
Orders.Salesrep_Customerid,
OrderDetails.ProductCode,
OrderDetails.Quantity
FROM Orders
JOIN Orderdetails
ON orders.orderid = orderdetails.orderid
WHERE Ordersdetails.ProductCode Like ('Upgrade%')
ORDER BY Orders.Salesrep_Customerid ASC
Should it be in instead of Like because i need it to select all the product codes that contain the word upgrade in it. because there are diferant numbers following it.
You guys have been an amazing help thank you
January 19, 2011 at 2:32 pm
Look for the extra s..
Ordersdetails.ProductCode
CEWII
January 19, 2011 at 2:54 pm
Justin 17041 (1/19/2011)
JOIN OrderdetailsON orders.orderid = orderdetails.orderid
WHERE Ordersdetails.ProductCode Like ('Upgrade%')
ORDER BY Orders.Salesrep_Customerid ASC
Should it be in instead of Like because i need it to select all the product codes that contain the word upgrade in it. because there are diferant numbers following it.
In matches a list of exact values. The LIKE will match all rows where product code starts with "Upgrade"
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply