I am using 5.0.26-NT on Windows 2000.
I have need to use a reference in the outer from clause in a subquery in
the select clause. Consider the following example:
Select (select b.baitID from b where b.entrydate curdate()) as
wantedBaitIDs from bait_tbl b;
My actual need is more complex than this as part of it is a rough cross
tab. If I try to define the table in the alias, not only do I lose
whatever benefits there are in the particular join I would use in the
outer from clause but would also require the join to be defined in each
subquery, requiring it to be examined each time it is used.
To be absolutely clear, in this example I want to use bait_tbl with the
alias of b in the subquery. In my actual query I reference the same
table twice with a different join set for each. I need to reference a
particular alias as that has the join set I need.