Results 1 to 3 of 3

Thread: Varrays

  1. #1
    Join Date
    Nov 2004
    Posts
    35

    Question Unanswered: Varrays

    Hello there,
    I've a problem in coding whereby I wish to break strings into components using whitespace as delimiter. following which, i would put them into Varrays. now the splitting has been done, however, after i assign the components to each element in the Varray, they return me with a Subscript beyond count error message.

    I discovered that my Varray only with extending the size of the Varray, then the it can be done. Can Varray erase off its previous storage after processing is made? Can anyone address my problem and offer a better solution to this?

    Thanks in advance

  2. #2
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    Do you have to work with VARRAYs? They are not the most convenient type to use in PL/SQL, and I would only use them if I had a database table with a VARRAY column (and so far I never have).

    Try this SPLIT function that returns a VARCHAR2 collection: www.williamrobertson.pwp.blueyonder.co.uk/code/utilities.pkg.txt

  3. #3
    Join Date
    Nov 2003
    Posts
    33
    Do you mean that you want to empty the array once you done with processing ? if, that is the case you can always set your array = null at the begining of your code.

    one more thing if you donot sure abt the number of elements you can always use the pl/sql table because pl/sql doesnot have upper bound so it will extend ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •