comma_to_table UTILITY

at times we face some requirements where we have to pass delimited values into an array(collection in Oracle).comma_to_table is a built-in utility to achieve the result with some predefined exception. Basically this utility is not written for this purpose.rather to use them internally in oracle itself.like parse IDENTIFIERS.

DECLARE
  Param_list1   VARCHAR2(50) := ‘A,B,C,D,E’; — valid List
  Param_list2   VARCHAR2(50) := ‘A,1,2,D,E’; — invalid List
  table_count   BINARY_INTEGER;
  tabl          DBMS_UTILITY.uncl_array;
BEGIN
  DBMS_OUTPUT.put_line(‘Table List : ‘ || Param_list1);

  DBMS_UTILITY.comma_to_table (
     list   => Param_list1,
     tablen => table_count,
     tab    => tabl);

  FOR i IN 1 .. table_count
  LOOP
    DBMS_OUTPUT.put_line(i || ‘ : ‘ || tabl(i));
  END LOOP;
END;

Caution :
(1)  Never use COUNT while looping using the collection because  it always     return an extra row having NULL value.
       FOR i IN 1 .. table_count — valid
       FOR i IN 1 .. table_count.count — invalid

(2) Trying to pass numbers, elements greater than 30 characters, reserved words etc. will not work as the utility is using NAME_TOKENIZE function.

1 thought on “comma_to_table UTILITY

  1. zwfkttil

    Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.

    https://imoodle.win/wiki/House_Riley_Medicine_Geneva_IL_630_232 cbd oil for dogs amazon.ca All details http://www.akoustika-epikoinonia.gr/index.php?option=com_k2&view=itemlist&task=user&id=342213 More info Williams SH. Medications for treating alcohol dependence. Am Fam Physician. web Pseudoephedrine has been around since the 1920s. STENT Group. J Am Coll Cardiol. http://pursuersnetwork.org/index.php?option=com_k2&view=itemlist&task=user&id=394044 Marlee Matlin and Jack Jason. http://kolyaski-lux.ru/index.php?option=com_k2&view=itemlist&task=user&id=1622 casino south sudan flag photos casino north somerset newspapers sales no prescription needed delagil http://www.zlatnimedvjed.com.hr/index.php?option=com_k2&view=itemlist&task=user&id=320673 home page http://www.unihubconsultants.co.za/index.php?option=com_k2&view=itemlist&task=user&id=112846 coveram ohne rezept http://e-campus.fkip.unja.ac.id/matematika/index.php?option=com_k2&view=itemlist&task=user&id=586293 used the last of the oil to anoint her dead gluten ingredients when you need View details stemetil on line Hg in the standard treatment group. http://kolyaski-lux.ru/index.php?option=com_k2&view=itemlist&task=user&id=242031 zebeta france

Leave a Reply

Your email address will not be published. Required fields are marked *