MySQL Forums
Forum List  »  Newbie

General error;-8 POS(1) Execution failed, parse again
Posted by: igo igo
Date: August 20, 2004 02:58AM

Hi, I have problem with this select:

SELECT customers.ID as c_ID, messages.ID as m_ID, true
FROM customers customers, messages messages
WHERE ((customers.ID, messages.ID) IN (SELECT customer_id, message_id FROM used_messages))
UNION
SELECT customers.ID as c_ID, messages.ID as m_ID, false
FROM customers, messages
WHERE ((customers.ID, messages.ID) NOT IN (SELECT customer_id, message_id FROM used_messages))

I get "General error;-8 POS(1) Execution failed, parse again."
What do I have to do?
I use MaxDB 7.5.0

Tables:


CREATE TABLE customers (
id SERIAL NOT NULL,
name VARCHAR(20) NOT NULL,
PRIMARY KEY (id)
);

CREATE TABLE messages (
id SERIAL NOT NULL,
name VARCHAR(20) NOT NULL,
PRIMARY KEY (id)
);

CREATE TABLE used_messages (
customer_id INTEGER NOT NULL,
message_id INTEGER NOT NULL,
PRIMARY KEY (customer_id, message_id)
);

ALTER TABLE used_messages
ADD FOREIGN KEY (message_id)
REFERENCES messages ;


ALTER TABLE used_messages
ADD FOREIGN KEY (customer_id)
REFERENCES customers ;

Options: ReplyQuote


Subject
Written By
Posted
General error;-8 POS(1) Execution failed, parse again
August 20, 2004 02:58AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.