Checkout UTL_RAW.CAST_TO_RAW to convert varchar2 to
raw datatypes
hth
connor
- "Hagedorn, Linda" <lindah_at_epocrates.com> wrote: >
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
>
Connor McDonald
http://www.oracledba.co.uk (mirrored at
http://www.oradba.freeserve.co.uk)
"Some days you're the pigeon, some days you're the statue"
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: =?iso-8859-1?q?Connor=20McDonald?=
INET: hamcdc_at_yahoo.co.uk
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Fri Jan 11 2002 - 12:30:24 CST