Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Bulk Data Type Testing Question

Bulk Data Type Testing Question

From: EscVector <Junk_at_webthere.com>
Date: 23 Mar 2007 10:44:42 -0700
Message-ID: <1174671881.244042.37840@e65g2000hsc.googlegroups.com>


What is the best way to determine if col1 contains a convertible number?
Bulk collect? Is there a simple SQL function to handle ORA-01722: invalid number.

Only the values inserted with 2 or -1 will should count.

CREATE TABLE TEST1(COL1 VARCHAR2(4000); BEGIN
   FOR x in 1..1000000
   LOOP

      INSERT INTO TEST1
      SELECT
      CASE mod(dbms_crypto.randomnumber,3)
         WHEN 1 THEN 'ABC'
         WHEN 2 THEN '123'
         WHEN -1 THEN '100.42'
         WHEN 0 THEN '444.4a' -- NULL --
to_char(dbms_crypto.randomnumber)
      ELSE 'BJORK'
      END
      FROM DUAL;

   END LOOP;
END;
/ Received on Fri Mar 23 2007 - 12:44:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US