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

Home -> Community -> Mailing Lists -> Oracle-L -> Inserting raw ascii into a varchar2 field

Inserting raw ascii into a varchar2 field

From: Hagedorn, Linda <lindah_at_epocrates.com>
Date: Thu, 10 Jan 2002 13:39:02 -0800
Message-ID: <F001.003ED168.20020110131021@fatcity.com>

Hello,

Does anyone have an example of how to insert raw ascii into a varchar2 field? 

For example,
CREATE TABLE LH_test 

( col1 varchar2(10), 

  col2 varchar2(10),
  col3 varchar2(10)  ) 
 PCTFREE 0 PCTUSED 80 INITRANS 1 MAXTRANS 255 LOGGING
 STORAGE(INITIAL 5M NEXT 5M MINEXTENTS 1
 MAXEXTENTS 2147483645 PCTINCREASE 0
 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
 TABLESPACE REGDAT  ;

commit ;
insert into lh_test values ( 'X'||chr(9), 'Y'||chr(A), 'Z'||chr(D) ) ;
 

Why am I doing this?  Because some non-printable ascii codes have been inserted in some fields and I am tasked with finding the bad data.  I need a test bed to insure I can scan for ranges of ascii characters, and need a range of known ascii printable and non-printable characters in a test table.  

The bad data can be in over 200 fields, so I need a broad tool; I'll gen the select statements after I have some test data to work with. 

Any suggestions or referrals are appreciated.  

Regards,

Linda   Received on Thu Jan 10 2002 - 15:39:02 CST

Original text of this message

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