|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
oracle view's and stored procedures
Hello,
I have a number of small tables I need to get bits of information from and put them all into a view. There is fairly intricate logic to decide which info comes from which table. Is it posisble to write a procedure/function that does all the logic and returns a table; then I'd like to use this table to define the view. If so, can anyone point me in the right direction of how to return a table from a stored procedure? I've worked with sql a lot, but this is my first attempt at pl/sql. Thanks! |
|
#2
|
|||
|
|||
|
Oracle 9i SQL supports case statements which let you put conditional logic in a view.
Otherwise, you have to write a SQLPLUS callable function (PRAGMA RESTRICT_REFERENCES) that returns every 'view' column all the time, and allows only a small amount of filtering. Which is not very view-like. See http://www.orafaq.com for some PL/SQL help with this kind of function. |
|
#3
|
|||
|
|||
|
Thanks for the info/advice. I'll post my solution here if I ever get one
Thanks again! |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > oracle view's and stored procedures |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|