在关键字附近的Incorrct

在关键字附近的Incorrct

本文介绍了在关键字附近的Incorrct syntex的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用来编写一个子查询来收集所有匹配的记录,但它给出了错误。我该怎么办?



我尝试过:



  SELECT   DISTINCT  dbo.master_order.order_no,dbo.master_order.program_no ,dbo.Setup_size.size_name,dbo.Setup_color.color_name,dbo.Setup_color.color_no,
dbo.transaction_production.total_weight,dbo.Setup_yarn.yarn_count,dbo.Setup_article_order.article_name,dbo.master_order.shipment_date, @ from as reprt, @ to as reprt1,
dbo.transaction_order.quantity,dbo.transaction_order.gsm
FROM dbo.master_order INNER JOIN
dbo.transaction_order ON dbo.master_order.order_id = dbo.transaction_order.order_id INNER JOIN
dbo.transaction_production ON dbo.transaction_order.trans_id = dbo.transaction_production.trans_id INNER JOIN
dbo.Setup_size ON dbo.transaction_order.size_id = dbo.Setup_size.size_id INNER JOIN
dbo.Setup_yarn ON dbo.transaction_order.yarn_id = dbo.Setup_yarn.yarn_id INNER JOIN
dbo.Setup_article_order ON dbo.transaction_order.article_id = dbo.Setup_article_order.article_id I NNER JOIN
dbo.Setup_color ON dbo.transaction_order.color_id = dbo。 Setup_color.color_id AND dbo.Setup_yarn.color_id = dbo.Setup_color.color_id
其中 dbo。 setup_color.color_id =(选择 color_no 来自 dbo.setup_color)
where master_order.shipment_date> = @ from master_order.shipment_date< = @ to
解决方案

i use to write a subquery to collect all matching record but it gives error. what should i do???

What I have tried:

SELECT   DISTINCT  dbo.master_order.order_no, dbo.master_order.program_no, dbo.Setup_size.size_name, dbo.Setup_color.color_name, dbo.Setup_color.color_no, 
                      dbo.transaction_production.total_weight, dbo.Setup_yarn.yarn_count, dbo.Setup_article_order.article_name, dbo.master_order.shipment_date, @from as reprt,@to as reprt1,
                      dbo.transaction_order.quantity, dbo.transaction_order.gsm
                       FROM         dbo.master_order INNER JOIN
                      dbo.transaction_order ON dbo.master_order.order_id = dbo.transaction_order.order_id INNER JOIN
                      dbo.transaction_production ON dbo.transaction_order.trans_id = dbo.transaction_production.trans_id INNER JOIN
                      dbo.Setup_size ON dbo.transaction_order.size_id = dbo.Setup_size.size_id INNER JOIN
                      dbo.Setup_yarn ON dbo.transaction_order.yarn_id = dbo.Setup_yarn.yarn_id INNER JOIN
                      dbo.Setup_article_order ON dbo.transaction_order.article_id = dbo.Setup_article_order.article_id INNER JOIN
                      dbo.Setup_color ON dbo.transaction_order.color_id = dbo.Setup_color.color_id AND dbo.Setup_yarn.color_id = dbo.Setup_color.color_id 
                      where dbo.setup_color.color_id=(select color_no from dbo.setup_color)
                      where master_order.shipment_date>=@from and master_order.shipment_date<=@to
解决方案


这篇关于在关键字附近的Incorrct syntex的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 01:58