Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Determine source-table from field within join?

Re: Determine source-table from field within join?

From: dean <deanbrown3d_at_yahoo.com>
Date: Mon, 13 Aug 2007 11:48:49 -0000
Message-ID: <1187005729.614342.16820@w3g2000hsg.googlegroups.com>


On Aug 13, 3:57 am, sybrandb <sybra..._at_gmail.com> wrote:
> On Aug 13, 9:49 am, dean <deanbrow..._at_yahoo.com> wrote:
>
> > 10g.
>
> > How can one tell which table a field in a query comes from? For
> > example a join between tables A and B contains 10 fields (F1 to F10),
> > 5 from A and 5 from B. How would one tell if field F1 is from A or B?
> > Is there a SQL-parsing system view?
>
> One would tell if *column* F1 (databases don't have 'fields') comes
> from A or B, by their alias.
> This also speeds up parsing.
> Other than that there is dba|all|user_tab_columns,
> and there is the view DICT with a complete description of all
> dictionary views, making questions like this one redundant.
> But I take it you can't be bothered to read any manual.
>
> --
> Sybrand Bakker
> Senior Oracle DBA

*_tab_columns doesn't have the columns of join-queries! Even with all the aliases present (and that's a big IF), it would still be a complicated task to be able to parse and SQL statement, and wasteful too considering Oracle did it already.

Maybe you are lucky enough to have control over every SQL statement in all apps, but I don't have that luxury. Received on Mon Aug 13 2007 - 06:48:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US