Thanks for your prompt response.
Rafique Awan, July 24, 2004 - 2:04 pm UTC
Thanks a lot for quick response.
First of all
I search this site for str2tbl but I did not find any useful example that I can implement according to my requirement without changing any code on Middle Tier side as right now we are populating pl/sql table on Java side and getting it as parameter to stored procedure. So I think in this case that to implement this approach involves lot of code changes on middle tier as well as on database.
secondly, Can you please provide me some examples that how this approach is better than approach I have right now?
Thirdly,
I agree with you that I can embed the definition of sql within stored procedure but
1) I am using this sql in more than one stored procedures as I embed sql within stored procedures, It will difficult to maintain in the long run.
2) By using view, I just have to maintain one view as If I will change the sql query , I just have to change it as one place, not in all stored procedures.
Thanks again.
July 24, 2004 - 9:12 pm UTC
but if you use this procedure from "everywhere" and not the view -- that won't be a problem...
it is not that this is "better", you asked for "different", this is "different".
the procedure that passes a "table" can just put the table into a string, put string into context and use str2tbl -- six one way, 1/2 dozen (which is just six) another. at the end of the day they should be equivalent but "different"