Path: news.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!newsfeed1.earthlink.net!newsfeed.earthlink.net!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!peernews3.colt.net!news0.de.colt.net!news-fra1.dfn.de!fu-berlin.de!uni-berlin.de!dialin-145-254-208-071.arcor-ip.NET!not-for-mail
From: "Dirk Schwarzmann" <Dirk.Schwarzmann@gmx.de>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Verweis auf unbekannte Tabelle?
Date: Sun, 2 Feb 2003 18:40:47 +0100
Lines: 29
Message-ID: <b1jl3u$1446bg$1@ID-93128.news.dfncis.de>
References: <b1jke6$13io82$1@ID-93128.news.dfncis.de>
NNTP-Posting-Host: dialin-145-254-208-071.arcor-ip.net (145.254.208.71)
X-Trace: fu-berlin.de 1044207550 37886320 145.254.208.71 (16 [93128])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Xref: newsfeed1.easynews.com comp.databases.oracle.misc:92604
X-Received-Date: Sun, 02 Feb 2003 10:38:30 MST (news.easynews.com)

Sorry, I´ve forgotten that this is an english newsgroup.
So, once again in english:

I´d like to save (in a table called X) the ID of rows of currently
unknown tables.

I created a structure for table X as following:

FOREIGN_ID number, -- id of the row in the unknown table
FOREIGN_PK varchar2(30), -- name of the table's primary key
FOREIGN_SCHEMA varchar2(30), -- schema name
FOREIGN_TABLE varchar(30) -- table name

Now, how can I select the specified row? I would think of something
like this:

select * from
  FOREIGN_SCHEMA.FOREIGN_TABLE a
where
  a.FOREIGN_PK = 'FOREIGN_ID'

In this, all FOREIGN_* values should be evaluated and replaced
with the values stored in table X.

Many thanks in advance,
Dirk



