473,508 Members | 4,179 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Subquery (not exists) problem (?)

Hello!

I've got some sort of syntax problem that doesn't seem to make a lot
of sense. I'm developing a Categories Theory application and because
of that I need to make big, and by "big" I mean HORRIBLY HUGE queries.
That one has 54 lines and 3 subqueries (only the first one is shown so
that I won't scare people off :)).

The thing is, I don't seem to be getting the hang of how to do
subqueries. The syntax seems fine... But it'll still always say the
same thing:

You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'exists ( select * from objeto c, morfismo f1, morfismo f2
(It's MySQL 4.0.11a-gamma)

The only difference I see between the code below and the mysql.com
documentation is that my subqueries aren't alone in their "where"
clauses... Aside from that, they seem pretty much okay. Am I missing
something?

10 · · select o.obj_nome obj, p1.mor_nome pi1, p2.mor_nome pi2
11 · · from objeto o, morfismo p1, morfismo p2
12 · · where
13 · · · o.cat_nome = '$scat' and p1.cat_nome = '$scat' and
p2.cat_nome = '$scat' and
14 · · · p1.obj_dest = '$sa' and
15 · · · p2.obj_dest = '$sb' and
16 · · · p1.obj_orig = o.obj_nome and
17 · · · p2.obj_orig = o.obj_nome and
18 · · · not exists ( select *
19 · · · · from objeto c, morfismo f1, morfismo f2
20 · · · · where
21 · · · · · c.cat_nome = '$scat' and f1.cat_nome = '$scat'
and f2.cat_nome = '$scat' and
·· · · · · · -- (... blah blah blah ...)
63 · · · )

Thank you in advance!

:: =EG= ::
Jul 19 '05 #1
0 997

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2061
by: Nachi | last post by:
Hi, Urgent Help appreciated.... I am getting resultset with first condition and when try to get the resutlset from second condition i am getting the above error in SQL200. I know that i am...
3
10552
by: Nachi | last post by:
I am getting 2 resultsets depending on conditon, In the second conditon i am getting the above error could anyone help me.......... CREATE proc sp_count_AllNewsPapers @CustomerId int as...
2
2893
by: Nachi | last post by:
Hi, Urgent Help appreciated.... I am getting resultset with first condition and when try to get the resutlset from second condition i am getting the above error in SQL200. I know that i am...
3
31413
by: Nachi | last post by:
I am getting 2 resultsets depending on conditon, In the second conditon i am getting the above error could anyone help me.......... CREATE proc sp_count_AllNewsPapers @CustomerId int as...
1
4130
by: jcf378 | last post by:
Hi all-- Does anyone have any insight as to how I might create a search form that allows a user to select criteria based on any related table in the whole database. The search form I have now only...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7058
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5635
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1565
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.