Microsoft Query 的子查询语法是什么?

发布于 2024-08-31 14:45:58 字数 330 浏览 6 评论 0原文

我正在尝试在 Microsoft Query 中执行简单的子查询连接,但我无法弄清楚语法。我也找不到任何语法文档。

如何在 Microsoft Query 中编写以下查询?

SELECT *
FROM (
    SELECT Col1, Col2
    FROM `C:\Book1.xlsx`.`Sheet1$`
) AS a
JOIN (
    SELECT Col1, Col3
    FROM `C:\Book1.xlsx`.`Sheet1$`
) AS b
ON a.Col1 = b.Col1

Microsoft Query 有官方文档吗?

I am trying to do a simple subquery join in Microsoft Query, but I cannot figure out the syntax. I also cannot find any documentation for the syntax.

How would I write the following query in Microsoft Query?

SELECT *
FROM (
    SELECT Col1, Col2
    FROM `C:\Book1.xlsx`.`Sheet1

I am trying to do a simple subquery join in Microsoft Query, but I cannot figure out the syntax. I also cannot find any documentation for the syntax.

How would I write the following query in Microsoft Query?

) AS a JOIN ( SELECT Col1, Col3 FROM `C:\Book1.xlsx`.`Sheet1

I am trying to do a simple subquery join in Microsoft Query, but I cannot figure out the syntax. I also cannot find any documentation for the syntax.

How would I write the following query in Microsoft Query?

) AS b ON a.Col1 = b.Col1

Is there official documentation for Microsoft Query?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

过期情话 2024-09-07 14:45:58
SELECT * 
    FROM (SELECT ID, Company FROM (`Sheet1)) AS a 
    INNER JOIN 
    (SELECT ID, Name FROM `Sheet1) AS b 
    ON a.ID = b.ID;

这对我有用。看起来唯一的区别是 INNER JOIN 与 JOIN。我的字段是 ID、公司、名称(按 Col1、Col2、Col3 的顺序)。

SELECT * 
    FROM (SELECT ID, Company FROM (`Sheet1)) AS a 
    INNER JOIN 
    (SELECT ID, Name FROM `Sheet1) AS b 
    ON a.ID = b.ID;

That worked for me. It looks like the only difference is INNER JOIN vs. JOIN. My fields are ID, Company, Name in that order for Col1, Col2, Col3.

装纯掩盖桑 2024-09-07 14:45:58

按照 Excel 查询向导创建/编辑查询。

您可以从 Excel 菜单访问它:数据 -> 导入外部数据 -> 导入数据

您也可以检查此链接
http://www.exceluser.com/explore/msquery1_1.htm

Follow Excel the Query Wizard to create/edit queries.

You can access it from Excel menu: Data->Import External Data->Import Data

As well you can check this link
http://www.exceluser.com/explore/msquery1_1.htm

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文