Subject | Re: Ambiguous query or bug ? |
---|---|
Author | dianeb77x |
Post date | 2001-12-06T03:35:26Z |
--- In ib-support@y..., "Claudio Valderrama C." <cvalde@u...> wrote:
Umm, how complicated is it? If alias exists, then that's the name of
the table-like-thing; otherwise, the simple table name is considered
the name of the table-like-thing.
[*rrr, tabl* nam*, what*v*r.]
Good. Low expectations are good.
I hesitate (particularly in my unclear state) to ask, but "how is this
opening a BCOW?"
db
> ""dianeb77x"" <dianeb77@h...> wrote in message< some snipping of headings ...>
> news:9ula7n+p9mu@e...
> > > > > SELECT RQSEL.D_KEYIDwhat=20
> > > > > FROM RQSEL
> > > > > INNER JOIN RQSEL R1
> > > > > ON (RQSEL."D_KEYID" =3D R1."D_KEYID")
> > > > > WHERE
> > > > > (RQSEL.WO_WORD =3D 'CIVILES' AND R1.WO_WORD =3D 'ADMIN')
> > >=20
> > > It's ambiguous: one of the table instances is not qualified, so
> > shouldcarry=20
> > > the engine use? When a table appears twice, both places should
> > an"R1".=20=20
> > > alias. Otherwise, results are almost random.
> >
> > What's ambiguous here? One instance is "RQSEL", the other is
> > As far as I can see, all column references are qualified with onename=20
> > or the other.[ Ah, would that I could be ...]
> > What's not to like?
>
> Diane, please be clear:
>if the alias takes precedence over the table name,should use
> how the h*ll is the engine going to assume that in one case it
> the original table name and in the other case, it should use thealias?
Umm, how complicated is it? If alias exists, then that's the name of
the table-like-thing; otherwise, the simple table name is considered
the name of the table-like-thing.
[*rrr, tabl* nam*, what*v*r.]
> This is totally confusing at least, but I don't expect more fromSQL.
Good. Low expectations are good.
> Furthermore, I've seen code that often uses the name and the aliaswithout
> care, so really allowing this in a join is opening a Big Can OfWorms.
I hesitate (particularly in my unclear state) to ask, but "how is this
opening a BCOW?"
> Whatever Mr Melton has to say, this is ambiguous from common senseGood for you, th*n don't allow it.
> perspective. I wouldn't allow it in any case.
db