【问题标题】:How to use cross join in access?如何在访问中使用交叉加入?
【发布时间】:2009-08-05 07:30:39
【问题描述】:

使用 MS - ACCESS 2003

表格

S.No   Details

1      name
2      address
3      email
4      phone
5      fax

等等……,

我想结合 s.no 的所有细节。喜欢

预期输出

S.No Details

1    name
     address 
     email
     Phone
     Fax
2    address
     name
     email
     phone
     fax
3    email 
     name
     address
     phone
     fax
4    phone
     name
     address
     email
     fax
5    fax
     name
     address 
     email
     Phone

等等……,

在 access 2003 中不接受交叉加入?任何其他解决方案。

需要查询帮助。

【问题讨论】:

    标签: ms-access


    【解决方案1】:

    我不确定要完成什么,但完整笛卡尔积(交叉连接)的语法是 select * from table1, table2

    如果您不想跨越所有内容,而只想跨越一些列,例如

    SELECT *
    FROM (select id from details) b, (select detail from details) c
    ;
    

    应该有效:

    id  detail
    1   name
    2   name
    3   name
    4   name
    5   name
    1   email
    2   email
    ....
    

    希望这会有所帮助。

    【讨论】:

    • @samuel。如何查询?
    【解决方案2】:

    如果您尝试在图形查询构建器中执行此操作,您只需添加两个表并确保它们之间没有链接。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-03-15
      • 1970-01-01
      • 1970-01-01
      • 2013-12-06
      • 2020-12-12
      • 2019-04-10
      • 1970-01-01
      • 2013-03-11
      相关资源
      最近更新 更多