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

Home -> Community -> Mailing Lists -> Oracle-L -> SQL Function question

SQL Function question

From: William Rogge <William_Rogge_at_voltek.com>
Date: Thu, 4 Jan 2001 13:09:30 -0500
Message-Id: <10731.125736@fatcity.com>


We have a table (designed after a spreadsheet) of financial data.

Through functions we can locate the correct row in the table very efficiently.

Now what they want to do is select any field from the table for the returned row.

My first impression was to pass the field_name as a function argument, but have been unsuccessful in the execution.

Anybody got some sample code doing this type of scenario?

Example

Item		Cost1		Cost2		Cost3		Cost4		Cost5		Total
Screw		.05		.01		.02		.04		0		.12
Tack		.01		.03		.01		0		.06		.11


Return Cost2 for Tack. Then return Cost5 for Screw.

We currently have a function to return Total (hard coded), but if I can make the column totally flexible we wouldn't need the hard coded function. Received on Thu Jan 04 2001 - 12:09:30 CST

Original text of this message

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