Subject | Re: Ambiguous query or bug ? |
---|---|
Author | dianeb77x |
Post date | 2001-12-05T14:16:23Z |
--- In ib-support@y..., "Claudio Valderrama C." <cvalde@u...> wrote:
As far as I can see, all column references are qualified with one name
or the other.
What's not to like?
name of the table or column.
db
> ""Béru"" <beru@m...> wrote in messageshould
> news:9ufmae+6h8p@e...
> > JJM posted the following problem on the french IB newsgroup:
> >
> > > SELECT RQSEL.D_KEYID
> > > FROM RQSEL
> > > INNER JOIN RQSEL R1
> > > ON (RQSEL."D_KEYID" = R1."D_KEYID")
> > > WHERE
> > > (RQSEL.WO_WORD = 'CIVILES' AND R1.WO_WORD = 'ADMIN')
>
> It's ambiguous: one of the table instances is not qualified, so what
> the engine use? When a table appears twice, both places should carryan
> alias. Otherwise, results are almost random.What's ambiguous here? One instance is "RQSEL", the other is "R1".
As far as I can see, all column references are qualified with one name
or the other.
What's not to like?
>to the
> BTW, MsSQL has a rule: once you introduce an alias, you cannot refer
> qualifier by its original name. I think it's fine since it helpsavoiding
> mistakes.That makes sense -- once you introduce an alias, that now *is* the
name of the table or column.
db