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 -> Function to do This?

Function to do This?

From: DelphiDev <delphidev_at_yahoo.com>
Date: Tue, 06 Apr 1999 10:18:05 -0400
Message-ID: <370A179D.CFF53BAD@yahoo.com>


What is the easiest way to retrieve the value of columns from "Lookup" tables (a table whose primary key is another tables foreign key)? I would like to create a function which would accept three parameters:

The function will do a search for Search String on the Primary Key of the Table. I know this is just a basic "JOIN" using primary and foreign keys. But is there a way that I could write a simple function to do this? Is this something that Oracle can do automatically? It has all of the necessary information.

Some examples of calls:
LookUp('JOBS','VP','JOBDESC'); --Returns "Vice President" LookUp('CITIES','CA'+'SF','ZIPCODE') --Returns ZipCode for S.F. CA (Note, CITIES primary key is "STATECODE+CITYCODE");

Thanks, Stan. Received on Tue Apr 06 1999 - 09:18:05 CDT

Original text of this message

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