Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

View with one column derived from a function

809801May 8 2012 — edited May 8 2012
Can we create a view with one of the columns being populated using a pl/sql script, that uses 2 other columns on the same row as input ?

Example,
Let's say I have a view with

Reg. No | Total | Customer Account | Billing Flag | CodeFn
1234 $45 2109 Y <The value in this column would be what the intended pl/sql script returns, after using the Reg# (1234) and Total(45) as Inputs>
1236 $15 2101 Y <The input values would be 1236 & 15>.

Basically, I'd like the script to generate a number that's returned in that column as opposed to doing a simple Select stmt to retrieve columns from other tables/views.

Edit: The view doesn't show up right ..so here's an image
view

Thanks!

Edited by: jess_saunders on May 8, 2012 2:05 PM
This post has been answered by Frank Kulash on May 8 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2012
Added on May 8 2012
2 comments
588 views