Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Complex PLSQL-JSP problem .
"jock" <jockey_sql_at_indya.com> wrote in message
news:77a43c6a.0206290014.2543c8d0_at_posting.google.com...
> Dear friends,
>
> I have a table with 3000 suppliers on it. Now,i want to rank these
> suppliers
> when the user clicks on "Submit" button on my JSP Form.
>
> The ranking function is not a simple "ORDER BY". I apply a function to
> each of the rows in the supplier table. The supplier who satisfies my
> conditions the best is ranked first.
>
> As an example, if my supplier has a lead time less than 20 days i give
> him 20 points. If he is in my state, i give him 20 points more. The
> supplier with the most points is my preferred supplier. I have half a
> dozen such criteria.
>
> What is the best method of doing this via JSP?
>
> **Create a temporary table with the ranked suppliers and then populate
> from this temporary table. The temporary table is created by calling a
> Stored procedure.
> Now, how do i generate the temporary table name and make sure its
> unique?
>
> **PLSQL Table-- How do i return a PLSQL Table to populate a JSP page?
>
> **Updating the base table is ruled out as there may be several users
> simaltaneously using the page.
>
> Some sample code or tips is deeply appreciated.
>
> Thank you very much.
Of course no version in sight, although you ask us to do your work.
Several comments
3 As long as you don't commit other users won't see your updates
2 IIRC use the CAST operator
1 Including the session id in the table name should do it.
However, creating tables on the fly is a *bad thing*
You might want to create one 'temporary' table, including the sessionid as
a column, wrap it in a view and include the sessionid in the where clause.
Also, I don't see anything that can't be done with ordinary sql alone,
without using temporary tables.
Looks like you are brainwashed by Sqlserver.
Hth
-- Sybrand Bakker Senior Oracle DBA to reply remove '-verwijderdit' from my e-mail addressReceived on Sat Jun 29 2002 - 04:57:13 CDT
![]() |
![]() |