Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
the multipart identifier could not be bound in SQL server stored procedure in select query

What I have tried:

SQL
SELECT DISTINCT 
                      dbo.master_order.program_no, dbo.transaction_order.pro_no, dbo.Setup_buyer.buyer_code, dbo.Setup_article_production.article_code, 
                      SUBSTRING(dbo.master_lotsmaking.lotno, 4, LEN(dbo.master_lotsmaking.lotno)) AS lotno, dbo.Setup_color.color_no, dbo.Setup_quality_knitting.quality_name, 
                      dbo.transaction_knittingdaily.rollweight AS total_weight, dbo.transaction_knittingdaily.rollno AS rolls, dbo.Setup_yarn.yarn_count, dbo.Setup_machine.guage, 
                      dbo.Setup_machine.gsm, dbo.Setup_machine.machine_no, dbo.Setup_supplier_knitting.supplier_name, Setup_article_production1.article_code AS article_code1, 
                      Setup_article_production2.article_code AS article_code2, Setup_article_production3.article_code AS article_code3, 
                      Setup_article_production4.article_code AS article_code4, Setup_article_production5.article_code AS article_code5, dbo.master_lotsmaking.date2, 
                      dbo.master_lotsmaking.Remarks, dbo.transaction_lotsmaking.took_weight AS tookwt, dbo.master_goods.f_weight, dbo.master_goods.date2 AS Expr1
                      FROM         dbo.master_lotsmaking INNER JOIN
                      dbo.Setup_article_production ON dbo.master_lotsmaking.article_id = dbo.Setup_article_production.article_id INNER JOIN
                      dbo.Setup_color ON dbo.master_lotsmaking.color_id = dbo.Setup_color.color_id INNER JOIN
                      dbo.transaction_lotsmaking ON dbo.master_lotsmaking.mas_id = dbo.transaction_lotsmaking.mas_id INNER JOIN
                      dbo.transaction_knittingdaily ON dbo.transaction_lotsmaking.tr_id = dbo.transaction_knittingdaily.tr_id INNER JOIN
                      dbo.master_knittingdaily ON dbo.transaction_knittingdaily.m_id = dbo.master_knittingdaily.m_id INNER JOIN
                      dbo.Setup_machine ON dbo.master_knittingdaily.machine_id = dbo.Setup_machine.machine_id INNER JOIN
                      dbo.Setup_yarn ON dbo.master_knittingdaily.yarn_id = dbo.Setup_yarn.yarn_id INNER JOIN
                      dbo.Setup_quality_knitting ON dbo.master_knittingdaily.quality_id = dbo.Setup_quality_knitting.quality_id INNER JOIN
                      dbo.master_order ON dbo.master_lotsmaking.order_id = dbo.master_order.order_id INNER JOIN
                      dbo.transaction_order ON dbo.master_order.order_id = dbo.transaction_order.order_id LEFT OUTER JOIN
                      dbo.Setup_buyer ON dbo.master_order.buyer_id = dbo.Setup_buyer.buyer_id INNER JOIN
                      dbo.Setup_supplier_knitting ON dbo.Setup_yarn.supplier_id = dbo.Setup_supplier_knitting.supplier_id INNER JOIN
                      dbo.transaction_goods ON dbo.transaction_lotsmaking.ltr_id = dbo.transaction_goods.ltr_id INNER JOIN
                      dbo.master_goods ON dbo.transaction_goods.m_id = dbo.master_goods.id LEFT OUTER JOIN
                      dbo.Setup_article_production AS Setup_article_production1 ON dbo.master_lotsmaking.article_id1 = Setup_article_production1.article_id LEFT OUTER JOIN
                      dbo.Setup_article_production AS Setup_article_production2 ON dbo.master_lotsmaking.article_id2 = Setup_article_production2.article_id LEFT OUTER JOIN
                      dbo.Setup_article_production AS Setup_article_production3 ON dbo.master_lotsmaking.article_id3 = Setup_article_production3.article_id LEFT OUTER JOIN
                      dbo.Setup_article_production AS Setup_article_production4 ON dbo.master_lotsmaking.article_id4 = Setup_article_production4.article_id LEFT OUTER JOIN
                      dbo.Setup_article_production AS Setup_article_production5 ON dbo.master_lotsmaking.article_id5 = Setup_article_production5.article_id
Posted
Updated 18-Oct-17 3:34am
v2
Comments
Kornfeld Eliyahu Peter 18-Oct-17 9:22am    
Which one?
Ali Khan 19-Oct-17 1:02am    
in whole query it shows red underline
codejet 19-Oct-17 17:53pm    
Give us the exact error message. Usually such errors are in the form :
"the multipart identifier <column_name > could not be bound in SQL server stored procedure in select query"

1 solution

Since we have no access to your DB at all, you will need to look at this yourself.
Use Sql Server Management Studio to open a new query on your DB, and copy that query into it. It should either underline the problem - telling you where it finds the problem - or when you try to run it it will give you a line reference you should be able to use to "narrow down" the problem. We can't do that for you - we have no idea what tables and fields you have created.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900