• <legend id='l3L0L'><style id='l3L0L'><dir id='l3L0L'><q id='l3L0L'></q></dir></style></legend>

      1. <small id='l3L0L'></small><noframes id='l3L0L'>

          <bdo id='l3L0L'></bdo><ul id='l3L0L'></ul>
        <tfoot id='l3L0L'></tfoot>
        <i id='l3L0L'><tr id='l3L0L'><dt id='l3L0L'><q id='l3L0L'><span id='l3L0L'><b id='l3L0L'><form id='l3L0L'><ins id='l3L0L'></ins><ul id='l3L0L'></ul><sub id='l3L0L'></sub></form><legend id='l3L0L'></legend><bdo id='l3L0L'><pre id='l3L0L'><center id='l3L0L'></center></pre></bdo></b><th id='l3L0L'></th></span></q></dt></tr></i><div id='l3L0L'><tfoot id='l3L0L'></tfoot><dl id='l3L0L'><fieldset id='l3L0L'></fieldset></dl></div>

        SQL 连接子查询

        SQL join subquery(SQL 连接子查询)

        <small id='AZKhE'></small><noframes id='AZKhE'>

          <bdo id='AZKhE'></bdo><ul id='AZKhE'></ul>
        • <tfoot id='AZKhE'></tfoot>

                  <tbody id='AZKhE'></tbody>
                <i id='AZKhE'><tr id='AZKhE'><dt id='AZKhE'><q id='AZKhE'><span id='AZKhE'><b id='AZKhE'><form id='AZKhE'><ins id='AZKhE'></ins><ul id='AZKhE'></ul><sub id='AZKhE'></sub></form><legend id='AZKhE'></legend><bdo id='AZKhE'><pre id='AZKhE'><center id='AZKhE'></center></pre></bdo></b><th id='AZKhE'></th></span></q></dt></tr></i><div id='AZKhE'><tfoot id='AZKhE'></tfoot><dl id='AZKhE'><fieldset id='AZKhE'></fieldset></dl></div>
                <legend id='AZKhE'><style id='AZKhE'><dir id='AZKhE'><q id='AZKhE'></q></dir></style></legend>
                  本文介绍了SQL 连接子查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我尝试寻找我的问题的答案,但未能得到真正有帮助的答案.我写了一个 sql 代码,但似乎无法找到问题所在.是否可以在FROM"部分中放置子查询?

                  I tried searching for an answer to my problem but failed to get an answer that actually helped. I've written an sql code but can't seem to find where the problem is. Is it possible to put a subquery in the "FROM" section?

                  SELECT S2.ITEM,
                         S1.SHOP_ORDER,
                         S1.OPERATION_NO,
                         S1.START_DATE,
                         S1.QTY_GOODS,
                         S1.QTY_ENTERED,
                         S1.QTY_MRB
                  FROM   (SELECT SHOP_ORD_RPT.OPERATION_NO,
                                 SHOP_ORD_RPT.SHOP_ORDER
                          FROM   FLAME.SHOP_ORD_RPT
                          WHERE  SHOP_ORD_RPT.OPERATION_NO = 110
                                  OR SHOP_ORD_RPT.OPERATION_NO = 370) AS S1
                         JOIN (SELECT SHOP_ORD.SHOP_ORDER
                               FROM   FLAME.SHOP_ORD
                               WHERE  SHOP_ORD.ITEM = '3A2375'
                                       OR SHOP_ORD.ITEM = '3A2703')AS S2
                           ON S1.SHOP_ORDER = S2.SHOP_ORDER; 
                  

                  我在运行脚本时收到的错误是:

                  The error I receive upon running the script is:

                  SQL 命令没有正确结束

                  SQL command not properly ended

                  如果有人可以提供帮助,我将不胜感激.非常感谢你-露丝

                  I'd appreciate if anyone can help. Thank you very much- Ruth

                  推荐答案

                  Try to remove AS keywrod after FROMJOIN 子查询如下

                  Try to remove AS keywrod after FROM and JOIN subquery as below

                  SELECT S2.ITEM, S1.SHOP_ORDER, S1.OPERATION_NO, S1.START_DATE,S1.QTY_GOODS, S1.QTY_ENTERED, S1.QTY_MRB
                  FROM (
                      SELECT SHOP_ORD_RPT.OPERATION_NO, SHOP_ORD_RPT.SHOP_ORDER
                      FROM FLAME.SHOP_ORD_RPT
                      WHERE SHOP_ORD_RPT.OPERATION_NO =110
                      OR SHOP_ORD_RPT.OPERATION_NO =370
                      )  S1
                  JOIN (
                      SELECT SHOP_ORD.SHOP_ORDER
                      FROM FLAME.SHOP_ORD
                      WHERE SHOP_ORD.ITEM ='3A2375'
                      OR SHOP_ORD.ITEM ='3A2703'
                      )  S2
                  ON S1.SHOP_ORDER = S2.SHOP_ORDER;
                  

                  这篇关于SQL 连接子查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                  SQL query to group by day(按天分组的 SQL 查询)
                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                  MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                  Include missing months in Group By query(在 Group By 查询中包含缺失的月份)

                    • <bdo id='v2n2w'></bdo><ul id='v2n2w'></ul>

                      <i id='v2n2w'><tr id='v2n2w'><dt id='v2n2w'><q id='v2n2w'><span id='v2n2w'><b id='v2n2w'><form id='v2n2w'><ins id='v2n2w'></ins><ul id='v2n2w'></ul><sub id='v2n2w'></sub></form><legend id='v2n2w'></legend><bdo id='v2n2w'><pre id='v2n2w'><center id='v2n2w'></center></pre></bdo></b><th id='v2n2w'></th></span></q></dt></tr></i><div id='v2n2w'><tfoot id='v2n2w'></tfoot><dl id='v2n2w'><fieldset id='v2n2w'></fieldset></dl></div>
                        <tbody id='v2n2w'></tbody>

                        • <small id='v2n2w'></small><noframes id='v2n2w'>

                        • <tfoot id='v2n2w'></tfoot><legend id='v2n2w'><style id='v2n2w'><dir id='v2n2w'><q id='v2n2w'></q></dir></style></legend>