Subject Re: [IBO] Generate For Table (update sql in TIB_Query)
Author Helen Borrie
At 04:45 PM 26/06/2007, you wrote:
>I have a simple query
>
>SELECT B.BANKA_ID
>FROM BANKA B
>
>KeyRelation = B

This doesn't belong (there are no joins and it is not valid to put a
relation alias in that property, anyway)

But the parser should either ignore it (because it does not apply) or
it should complain, with an exception.

>KeyLinks = BANKA_ID

That should be OK, provided it is unique in your set.


>Button Generate forTable in UpdateSQL tab in TIB_Query Editor
>generates following SQL.
>
>EDIT:
>
>UPD TE SET
>WHERE
>RDB$DB_KEY = :DB_KEY
>
>
>
>INSERT:
>
>INSER) INTO (
>VALUES )
>
>
>DELETE:
>
>DELETE FROM
>WHERE
>RDB$DB_KEY = :DB_KEY
>
>
>What am i doing wrong (it is the same for interbase7.0 or firebird2.0)

As mentioned; but invalid properties should not generate garbage
SQL, or ignore a good Keylink. What I think is *happening* with the
parser is that your KeyRelation setting is making it think it has to
deal with two tables and it has no KeyLinks that fit any table named "B".

What build of IBO are you using? I wonder if you are trying to use
that 4.8 test build that Jason put up in the Trustware repository for
me at the weekend to test a bug-fix? (It didn't work....)

Helen