Subject | Re: invalid request BLR at offset 383 BLR syntax error...... |
---|---|
Author | Adam |
Post date | 2006-06-05T23:35:30Z |
--- In firebird-support@yahoogroups.com, "Leonardo Cosmai"
<leonardo.cosmai@...> wrote:
it does not have the results from A to use as input parameters. You
need to force table A to be used before the stored procedure to avoid
this. You can do this with a left join, and use the where clause to
prevent the potential nulls on the right table
SELECT A.*
FROM A
LEFT JOIN A_STORE_PROCEDURE(?,?) B ON (A.COL1 = B.COL1)
WHERE B.COL1 IS NOT NULL
Is logically equivalent but should work.
Adam
<leonardo.cosmai@...> wrote:
>B.COL1)
> --- In firebird-support@yahoogroups.com, "Ann W. Harrison"
> <aharrison@> wrote:
> >
> > Leonardo Cosmai wrote:
> >
>
> > One idea is to upgrade to 1.5.3, which fixes a bunch of bugs. Other
> > ideas will need more information. Firebird is not natively a SQL
> > engine. It runs a very general binary relational language called
> > BLR that was designed for machine generation. Constructions of
> > SQL, QUEL, and Data Language can be represented in BLR. So, your
> > error says that something went wrong in the translation of your
> > query to BLR... Now, that could be just your statement, though
> > that's unlikely. Or it could be a stored procedure. Or it could
> > be a reference to an external function.... If you can identify
> > the statement associated with the error, that would be a great
> > step forward.
>
> Sorry for the delay...
>
> This is the statement:
>
> SELECT A.* FROM A INNER JOIN A_STORE_PROCEDURE(?,?) B ON (A.COL1 =
>The optimiser may be placing A_STORE_PROCEDURE first, and as a result
> where A_STORE_PROCEDURE is really a simple FOR SELECT.....
it does not have the results from A to use as input parameters. You
need to force table A to be used before the stored procedure to avoid
this. You can do this with a left join, and use the where clause to
prevent the potential nulls on the right table
SELECT A.*
FROM A
LEFT JOIN A_STORE_PROCEDURE(?,?) B ON (A.COL1 = B.COL1)
WHERE B.COL1 IS NOT NULL
Is logically equivalent but should work.
Adam