Subject Subselect doesn't work
Author Thomas Zillinger
Hi there!
Given the following table

CREATE TABLE ELENA_TRIPLES (
SUBJECT VARCHAR(75),
PREDICATE VARCHAR(300),
OBJECT VARCHAR(5000)
);

Has somebody an idea why the current statement wouldn't work with firebird.

SELECT triples.PREDICATE, triples.ARG0, triples.ARG1
FROM (SELECT 'http://test#goodTitle' AS PREDICATE, triples.SUBJECT AS
ARG0, triples.OBJECT AS ARG1
FROM ELENA_TRIPLES triples WHERE triples.PREDICATE
='http://purl.org/dc/elements/1.1/title'
AND triples.OBJECT = 'Artificial Intelligence'
UNION SELECT 'http://test#goodTitle' AS PREDICATE, triples.SUBJECT AS
ARG0, triples.OBJECT AS ARG1
FROM ELENA_TRIPLES triples WHERE triples.PREDICATE =
'http://purl.org/dc/elements/1.1/title'
AND triples.OBJECT = 'Just Java' ) triples
WHERE triples.PREDICATE = 'http://test#goodTitle'
<http://test#goodTitle%27>

This query is acutally automatically generated by another component
(edutella provider for triple tables), but firebird doesn't seem to be
very happy with that.

I put this query also in IBExpert, using fbclient.dll and it complaind
with the SELECT statement in row. May there be a way to just rewirte
this query in another way?

Many regards for any information
Tom