查询无效

问题描述:

我的查询是



my query is

select university_info.university_name from university_info where not exists(SELECT
 state_visit_info.organization_id, university_info.university_name ,university_info.university_id FROM university_info INNER JOIN
state_visit_info ON university_info.university_id = state_visit_info.university_id INNER JOIN
country_info ON state_visit_info.country_code = country_info.country_code where
state_visit_info.organization_id='01')







它无法正常工作




its not working

我们无能为力,即使你提出了一个实际问题:解决这个需要仔细查看,完成实际数据你正在使用来检索。没有数据 - 并且对你期望选择的内容有所了解 - 没有人可以做任何事情。



所以,这取决于你。

打开SSMS,选择你的数据库并开始一个新查询。

复制并粘贴它,然后执行它。

看看你得到了什么。这是你期望的吗?没有?所以砍掉外面的东西( SELECT ... WHERE NOT EXISTS 部分)并再次运行它。

你得到了什么?你期待什么?没有?所以砍掉一些并继续直到你这样做。然后稍稍退一步,看看它有什么效果。



对不起,但我们不能为你做到这一点。
There is nothing we can do with that, even if you included an actual question: solving this needs careful looking, complete with the actual data you are using to retrieve from. Without the data - and a good idea of what you expect to select - nobody can do anything much.

So, it's up to you.
Open SSMS, select your DB and start a new query.
Copy and paste it in, and execute it.
Look at what you do get. Is it what you expect? No? So chop out the outside stuff ( the SELECT...WHERE NOT EXISTS portion) and run it again.
What do you get? What you expected? No? So chop out some more and continue until you do. Then put a bit back, and see what effect it has.

Sorry, but we can't do that for you.