Subject SQL Searching on JOINed tables
Author ntcl1234
I need to do a search on a table in a Firebird db, looking for the
occurence of two words in a particular piece of text. The words are
indexed in the table against chapter, section, paragraph and line.
I've produced an SQL string:

SELECT DISTINCT ALLENENC.WORD, ALLENENC.CHAPTER, ALLENENC.SECTION
FROM ALLENENC INNER JOIN ALLENENC AS ALLENENC_1 ON (ALLENENC_1.LINE
= ALLENENC.LINE) AND (ALLENENC.PARAGRAPH = ALLENENC_1.PARAGRAPH) AND
(ALLENENC.CHAPTER = ALLENENC_1.CHAPTER) AND (ALLENENC.SECTION =
ALLENENC_1.SECTION) WHERE (((ALLENENC.WORD)='PAIN') AND
((ALLENENC_1.WORD)='LEFT'));

where the table is called ALLENENC. The WORD column is indexed.
This sql works in other db's I've tried but in Firebird (using
dotNet), I get the error(s)

No message for error code 335544569 found.
No message for error code 335544436 found.
No message for error code 335544634 found.
No message for error code 335544382 found.

I can open one table and search on one word but it won't let me link
in a second instance of the table.

I need to know what I've done wrong, or if this is not possible in
Firebird/dotNet.

Can anyone help?