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: Jerome Vitalis <vitalismanN0SP4M_at_gmail.com>
Date: Mon, 13 Aug 2007 13:59:38 +0200
Message-ID: <46c047a4$0$30357$79c14f64@nan-newsreader-07.noos.net>


dean wrote:
> 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.
>
>

Post an example. What you say does not make sense (at least to me). Received on Mon Aug 13 2007 - 06:59:38 CDT

Original text of this message

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