MS Access-选择嵌套用户输入? [英] MS Access - Selecting against nested user input?

查看:58
本文介绍了MS Access-选择嵌套用户输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从另一个具有用户输入的选择查询的结果中从Access的表中进行选择?

Is it possible to select from a table in Access from the result of another select query that has user input?

这是我的初始查询:

SELECT List FROM [Material and Finishes] WHERE Materials = [Material:];

我正在尝试将其放入此查询中:

I'm trying to put it into this query:

SELECT SubstanceName FROM [Core] WHERE Product Like '*Plastic*' 

我正在尝试将它们结合在一起:

I'm trying to combine them in this:

SELECT SubstanceName
FROM [Core] 
WHERE ProductAreas > ANY 
( SELECT List FROM [Material and Finishes] WHERE Materials = [Material:]) 

但是,我只能在子查询列表"中获得无效的备注,OLE或超链接对象.

However I only ever get Invalid Memo, OLE, or Hyperlink Object in subquery 'List'.

有什么想法吗?

推荐答案

这是您想要的吗?

SELECT c.SubstanceName
FROM [Core] as c
WHERE EXISTS (SELECT 1
              FROM [Material and Finishes] as mf
              WHERE mf.Materials = [Material:] AND
                    mf.Product Like '*' & c.ProductAreas & '*'
             ) ;

这篇关于MS Access-选择嵌套用户输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆