Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 9i PL/SQL Collection Question
On 16 May 2004 07:35:43 -0700, aaron_rouse_at_yahoo.com (Aaron Rouse)
wrote:
>Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1084657398.145929_at_yasure>...
>>
>> Far too much code for me to take the time to read and understand it.
>>
>> Suffice it to say that unless you are being paid by the hour ... I
>> still can't understand the point of anything more than a simple:
>>
>> SELECT .....
>> INTO x, y, z
>> FROM .......
>> WHERE ......
>>
>> Then rather than using a function return the three values as OUT
>> parameters from a stored proc.
>
>If I were to spit out the three values via a stored procedure then
>would I be able to select from those values or should I just quit over
>complicating it and plug those three values into a table, select the
>item I need, then truncate it for the next go around.
Obviously, you have been exposed to sqlserver and you think you can
mimic a sqlserver temporary table, by mis-using a collection for that
purpose.
In Oracle you don't need temporary tables. If you still think you need
temporary tables, create a globally temporary table, and select from
that table.
Other than that, try to deprogram your bad habits, and learn sql and
Oracle.
What you are doing now is damn inefficient. You are on your way to hell and somehow, someway, somewhere there will be a DBA, who is going to suffer from your 'programs'
-- Sybrand Bakker, Senior Oracle DBAReceived on Sun May 16 2004 - 09:47:35 CDT