Xref: alice comp.databases.oracle.misc:35562
Path: alice!news-feed.fnsi.net!news.idt.net!dispose.news.demon.net!demon!colt.net!newspeer.clara.net!news.clara.net!easynet-tele!easynet.net!diablo.theplanet.net!news.theplanet.net!newspost.theplanet.net!not-for-mail
From: Connor McDonald <connor_mcdonald@yahoo.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Referencing columns by their position in a table ??
Date: Wed, 07 Jul 1999 22:28:25 +0800
Organization: Customer of Planet Online
Message-ID: <37836409.6A80@yahoo.com>
References: <931349966.7333.0.nnrp-12.d4e48d0d@news.demon.co.uk> <7lvj5i$d5m$1@thor.wirehub.nl> <931353330.8696.0.nnrp-12.d4e48d0d@news.demon.co.uk>
Reply-To: connor_mcdonald@yahoo.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news5.svr.pol.co.uk 931382684 14732 62.136.196.161 (7 Jul 1999 21:24:44 GMT)
NNTP-Posting-Date: 7 Jul 1999 21:24:44 GMT
X-Complaints-To: abuse@theplanet.net
X-Mailer: Mozilla 3.01 (Win95; I)
To: Matt Randle <matt@imat.demon.co.uk>
Lines: 27

Matt Randle wrote:
> 
> That doesn't work as you can't use the results of a select statement to
> specify a column name.
> 
> For example,
> 
> Select (select column_name from dba_tab_columns where column_id = 2 and
> table_name = 'Tabname') from tabname;
> 
> is not valid.
> 
> Doing it this way would require two sql satements ?? (which actually is
> better than my current method)
> 
> Is there anyway of doing it with one statement ??
> 
> Matt.

Have a read about dbms_sql under $ORACLE_HOME/rdbms/admin/dbmssql.sql
-- 
===========================================
Connor McDonald
"These views mine, no-one elses etc etc"
connor_mcdonald@yahoo.com

"Some days you're the pigeon, and some days you're the statue."
