Subject | Re: [firebird-support] Firebird Query Problem |
---|---|
Author | Ann W. Harrison |
Post date | 2005-02-08T16:37:14Z |
bk007121 wrote:
1.5x, but 1.1 is a new bird to me.
size - fixed in the newer birds (1.5.x I think). But that doesn't
normally happen until you've got a very complex query.
Your mix of table aliases (IL.xxx, GL.xxx) and table qualifiers
(GRPLIST.xxx, ITMLIST.xxx) are confusing to the human reader but
disappear from the query during the parse phase. The number of select
items and the length of names are not an issue either, as they are also
resolved during parsing.
You use the SQL 89 join syntax -
FROM ITMLIST IL,GRPLIST GL
WHERE GRPLIST.GROUP_ID=ITMLIST.GROUP_ID
AND ITMLIST.ITEM_ID=1
- rather than the SQL-92 syntax
FROM ITMLIST IL
JOIN GRPLIST GL ON GRPLIST.GROUP_ID = ITMLIST.GROUP_ID
WHERE ITMLIST.ITEM_ID=1
That's OK, as long as you don't mix the two - there is a precedence
between the two join styles that is NOT intuitive and leads to
unexpected results.
Still, it's a very simple query, unless one or both of your tables is
actually a view.
Is there something you didn't tell us?
Regards,
Ann
> can anyone please tell me what the error below means and how I can getThat's odd. I know of a number of Firebirds 1.0x and some Firebirds
> rid of it? (Firebird 1.1)
1.5x, but 1.1 is a new bird to me.
>Typically this happens when the query compiler runs out of scratch block
> "Invalid token.
> invalid request BLR at offset 140.
> Implementation limit exceeded.
> block size exceeds implementation restriction."
size - fixed in the newer birds (1.5.x I think). But that doesn't
normally happen until you've got a very complex query.
Your mix of table aliases (IL.xxx, GL.xxx) and table qualifiers
(GRPLIST.xxx, ITMLIST.xxx) are confusing to the human reader but
disappear from the query during the parse phase. The number of select
items and the length of names are not an issue either, as they are also
resolved during parsing.
You use the SQL 89 join syntax -
FROM ITMLIST IL,GRPLIST GL
WHERE GRPLIST.GROUP_ID=ITMLIST.GROUP_ID
AND ITMLIST.ITEM_ID=1
- rather than the SQL-92 syntax
FROM ITMLIST IL
JOIN GRPLIST GL ON GRPLIST.GROUP_ID = ITMLIST.GROUP_ID
WHERE ITMLIST.ITEM_ID=1
That's OK, as long as you don't mix the two - there is a precedence
between the two join styles that is NOT intuitive and leads to
unexpected results.
Still, it's a very simple query, unless one or both of your tables is
actually a view.
Is there something you didn't tell us?
Regards,
Ann