查询问题...... [英] Query question...

查看:76
本文介绍了查询问题......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有表User-App和表App Profile

User-App App Profile

IDuser IDApp IDApp

1 34 34

1 45 45

2 34

2 45

2 90

3 34


我似乎无法弄清楚以下内容:

我需要找出适合App配置文件的用户。通过拟合配置文件

我的意思是用户对Profile表中的每个应用程序(但不是更多)使用1。在这种情况下,只有用户1和3符合配置文件。


有人能指出我正确的方向吗?

谢谢!

john

I have table User-App and table App Profile
User-App App Profile
IDuser IDApp IDApp
1 34 34
1 45 45
2 34
2 45
2 90
3 34

I can''t seem to figure out the following:
I need to find out which user fits the App profile. With fitting the profile
I mean that the user uses 1 to every App (but not more) of those that are in
the Profile table. In this case only user 1 and 3 fit the profile.

Can someone point me in the right direction?
Thanks!
john

推荐答案

您是否尝试过在查询中的两个表之间进行内部联接,在IDApp字段之间链接




hth

" john" < jo ** @ test.comwrote in message

news:3v **************************** ** @ casema.nl ...
have you tried an Inner Join between the two tables in the query, linked
between the IDApp fields?

hth
"john" <jo**@test.comwrote in message
news:3v******************************@casema.nl...

我有表User-App和表App Profile

User-App App Profile

IDuser IDApp IDApp

1 34 34

1 45 45

2 34

2 45

2 90

3 34


我似乎无法弄清楚以下内容:

我需要找出适合App配置文件的用户。适合
I have table User-App and table App Profile
User-App App Profile
IDuser IDApp IDApp
1 34 34
1 45 45
2 34
2 45
2 90
3 34

I can''t seem to figure out the following:
I need to find out which user fits the App profile. With fitting the



个人资料

profile


我的意思是用户对每个应用程序使用1(但不是更多) )那些是
I mean that the user uses 1 to every App (but not more) of those that are



in

in


Profile表。在这种情况下,只有用户1和3符合配置文件。


有人能指出我正确的方向吗?

谢谢!

john

the Profile table. In this case only user 1 and 3 fit the profile.

Can someone point me in the right direction?
Thanks!
john



" john" < jo ** @test.comwrote in

新闻:3v ***************************** *@casema.nl:
"john" <jo**@test.comwrote in
news:3v******************************@casema.nl:

我有表User-App和表App Profile

User-App App Profile

IDuser IDApp IDApp

1 34 34

1 45 45

2 34

2 45

2 90

3 34


我似乎无法弄清楚以下内容:

我需要找出适合App配置文件的用户。使用

拟合配置文件,我的意思是用户对配置文件表中的每个应用程序使用1(但不是更多)。在这个

的情况下,只有用户1和3符合个人资料。


有人能指出我正确的方向吗?

谢谢!

john
I have table User-App and table App Profile
User-App App Profile
IDuser IDApp IDApp
1 34 34
1 45 45
2 34
2 45
2 90
3 34

I can''t seem to figure out the following:
I need to find out which user fits the App profile. With
fitting the profile I mean that the user uses 1 to every App
(but not more) of those that are in the Profile table. In this
case only user 1 and 3 fit the profile.

Can someone point me in the right direction?
Thanks!
john



将其粘贴到查询构建器的sql视图中,它应该是

工作。


选择IDuser,

count(User-App.IDApp)为x

来自User-App

INNER JOIN [App Profile]

ON User-App.IDApp = [App Profile] .IDApp

HAVING count(User-App.IDApp)= dCount(" ; IdApp"," [App Profile]")

GROUP BY IDUser;


-

Bob Quintal


PA是我已经改变了我的电子邮件地址。


-

通过免费的Usenet发布来自 http://www.teranews.com 的帐户

paste this into the sql view of the query builder, it should
work.

SELECT IDuser,
count(User-App.IDApp) as x
FROM User-App
INNER JOIN [App Profile]
ON User-App.IDApp = [App Profile].IDApp
HAVING count(User-App.IDApp) = dCount("IdApp","[App Profile]")
GROUP BY IDUser;

--
Bob Quintal

PA is y I''ve altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com


感谢Bob,

不幸的是我一直收到错误:
Thanks Bob,
Unfortunately I keep getting an error on:

HAVIN G count(User-App.IDApp)= dCount(" IdApp"," [App Profile]")
HAVING count(User-App.IDApp) = dCount("IdApp","[App Profile]")



我尝试了所有可能的引用并尝试过替换,在;但我保持

语法错误。

不知道是什么导致了这个?

john


" Bob Quintal" < rq ****** @ sPAmpatico.caschreef在bericht

新闻:Xn ********************** @ 66.150 .105.47 ...

I tried every possible quoting and also tried replacing , in ; but I keep
getting a syntax error.
Any idea what''s causing this?
john

"Bob Quintal" <rq******@sPAmpatico.caschreef in bericht
news:Xn**********************@66.150.105.47...


" john" < jo ** @test.comwrote in

新闻:3v ***************************** *@casema.nl:
"john" <jo**@test.comwrote in
news:3v******************************@casema.nl:

>我有表User-App和表App Profile
User-App App Profile
IDuser IDApp IDApp
1 34 34
1 45 45
2 34
2 45
2 90
我可以''似乎要弄清楚以下内容:
我需要找出适合App配置文件的用户。
适合配置文件,我的意思是用户使用1到每个应用程序(但不是更多)的配置文件表中的那些。在这种情况下,只有用户1和3符合个人资料。

有人能指出我正确的方向吗?
谢谢!
约翰
>I have table User-App and table App Profile
User-App App Profile
IDuser IDApp IDApp
1 34 34
1 45 45
2 34
2 45
2 90
3 34

I can''t seem to figure out the following:
I need to find out which user fits the App profile. With
fitting the profile I mean that the user uses 1 to every App
(but not more) of those that are in the Profile table. In this
case only user 1 and 3 fit the profile.

Can someone point me in the right direction?
Thanks!
john



将其粘贴到查询构建器的sql视图中,它应该

工作。


SELECT IDuser,

count(User-App.IDApp)为x

来自User-App

INNER JOIN [应用程序资料]

ON User-App.IDApp = [App Profile] .IDApp

HAVING count(User-App.IDApp)= dCount(" IdApp"," [App Profile]")

GROUP BY IDUser;


-

Bob Quintal


PA是我我我改变了我的电子邮件地址。


-

通过 http://www.teranews.com



这篇关于查询问题......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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