|
-
Have you considered modeling this as a table and using a nested table type in your PL/SQL?
If I properly inferred what you are trying to accomplish from your example, I think that you are just wanting to keep track of the information of up to 200 SQL statements. Each individual SQL statement is stored in portions corresponding to the SELECT, FROM, WHERE and ORDER BY clauses and may have up to 200 entries of each.
I would suggest that you define a type similar to the following:
CREATE OR REPLACE TYPE tSQL_SET AS OBJECT(
SQL_ID NUMBER,
SELECT_ITEM VARCHAR2(1000),
FROM_ITEM VARCHAR2(1000),
WHERE_ITEM VARCHAR2(1000),
ORDER_ITEM VARCHAR2(1000) );
CREATE OR REPLACE TYPE SQL_ITEM_SET AS TABLE OF tSQL_SET;
The SELECT, FROM, WHERE and ORDER items are synonomous to what you had before. A row of these in the table would be the same as one row in one dimension of your original tSQL_COL array.
The SQL_ID column allows you to group these items together, so the new tSQL_SET object is equivalent to your total original tSQL_COL array, without an arbitrary bound of 200 elements.
The new SQL_ITEM_SET type is the same as what you had before, but it does not have an arbitrary bound of 200 elements either, and it doesn't contain nested datatypes that will cause you problems.
HTH,
Heath
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|