dbTalk Databases Forums  

Re: In what type in Oracle it is possible to write down binary <8bit?

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss Re: In what type in Oracle it is possible to write down binary <8bit? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Ed Prochak
 
Posts: n/a

Default Re: In what type in Oracle it is possible to write down binary <8bit? - 10-07-2008 , 03:59 PM






On Oct 3, 5:47*am, "gym dot scuba dot kennedy at gmail"
<kenned... (AT) verizon (DOT) net> wrote:
Quote:
mmf.stave... (AT) gmail (DOT) com> wrote in message

news:e0ff1b3e-4f77-41dd-b628-4123954f2b47 (AT) s50g2000hsb (DOT) googlegroups.com...> Hello,

In what type in Oracle it is possible to write down binary <8bit?

Thanks,

St. Mr

That would be a raw column or a blob column depending upon size.
Jim
Actually nothing stops you from inserting nonprintable ascii
characters in a VARCHAR2 column.
[Speaking from the experience of an ASCII nul (0) inserted in VARCHAR2
by a C program.]

I have a table badlog with column
last_line VARCHAR2(100);

insert into badlog values ('eee'||chr(1)||chr(5)||'ddd') ;

SELECT * from badlog;

LAST_LINE
--------------------
eee<01><05>ddd --- modified to not post binary 01 and 05 in case
that


1 row selected.

select rawtohex(last_line) from badlog ;
RAWTOHEX(LAST_LINE)
--------------------------------
6565650105646464 --- you can see they are real binary values.


1 row selected.

I would not recomend this, but it works. Displaying the result will
depend heavily on your character set.
Ed


Reply With Quote
  #12  
Old   
Ed Prochak
 
Posts: n/a

Default Re: In what type in Oracle it is possible to write down binary <8bit? - 10-07-2008 , 03:59 PM






On Oct 3, 5:47*am, "gym dot scuba dot kennedy at gmail"
<kenned... (AT) verizon (DOT) net> wrote:
Quote:
mmf.stave... (AT) gmail (DOT) com> wrote in message

news:e0ff1b3e-4f77-41dd-b628-4123954f2b47 (AT) s50g2000hsb (DOT) googlegroups.com...> Hello,

In what type in Oracle it is possible to write down binary <8bit?

Thanks,

St. Mr

That would be a raw column or a blob column depending upon size.
Jim
Actually nothing stops you from inserting nonprintable ascii
characters in a VARCHAR2 column.
[Speaking from the experience of an ASCII nul (0) inserted in VARCHAR2
by a C program.]

I have a table badlog with column
last_line VARCHAR2(100);

insert into badlog values ('eee'||chr(1)||chr(5)||'ddd') ;

SELECT * from badlog;

LAST_LINE
--------------------
eee<01><05>ddd --- modified to not post binary 01 and 05 in case
that


1 row selected.

select rawtohex(last_line) from badlog ;
RAWTOHEX(LAST_LINE)
--------------------------------
6565650105646464 --- you can see they are real binary values.


1 row selected.

I would not recomend this, but it works. Displaying the result will
depend heavily on your character set.
Ed


Reply With Quote
  #13  
Old   
Ed Prochak
 
Posts: n/a

Default Re: In what type in Oracle it is possible to write down binary <8bit? - 10-07-2008 , 03:59 PM



On Oct 3, 5:47*am, "gym dot scuba dot kennedy at gmail"
<kenned... (AT) verizon (DOT) net> wrote:
Quote:
mmf.stave... (AT) gmail (DOT) com> wrote in message

news:e0ff1b3e-4f77-41dd-b628-4123954f2b47 (AT) s50g2000hsb (DOT) googlegroups.com...> Hello,

In what type in Oracle it is possible to write down binary <8bit?

Thanks,

St. Mr

That would be a raw column or a blob column depending upon size.
Jim
Actually nothing stops you from inserting nonprintable ascii
characters in a VARCHAR2 column.
[Speaking from the experience of an ASCII nul (0) inserted in VARCHAR2
by a C program.]

I have a table badlog with column
last_line VARCHAR2(100);

insert into badlog values ('eee'||chr(1)||chr(5)||'ddd') ;

SELECT * from badlog;

LAST_LINE
--------------------
eee<01><05>ddd --- modified to not post binary 01 and 05 in case
that


1 row selected.

select rawtohex(last_line) from badlog ;
RAWTOHEX(LAST_LINE)
--------------------------------
6565650105646464 --- you can see they are real binary values.


1 row selected.

I would not recomend this, but it works. Displaying the result will
depend heavily on your character set.
Ed


Reply With Quote
  #14  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: In what type in Oracle it is possible to write down binary <8bit? - 10-07-2008 , 07:59 PM



Ed Prochak (edprochak (AT) gmail (DOT) com) wrote:
: On Oct 3, 5:47=A0am, "gym dot scuba dot kennedy at gmail"
: <kenned... (AT) verizon (DOT) net> wrote:
: > <mmf.stave... (AT) gmail (DOT) com> wrote in message
: >
: > news:e0ff1b3e-4f77-41dd-b628-4123954f2b47 (AT) s50g2000hsb (DOT) googlegroups.com...=
: > Hello,
: >
: > > In what type in Oracle it is possible to write down binary <8bit?
: >
: > > Thanks,
: >
: > > St. Mr
: >
: > That would be a raw column or a blob column depending upon size.
: > Jim

: Actually nothing stops you from inserting nonprintable ascii
: characters in a VARCHAR2 column.
: [Speaking from the experience of an ASCII nul (0) inserted in VARCHAR2
: by a C program.]

: I have a table badlog with column
: last_line VARCHAR2(100);

: insert into badlog values ('eee'||chr(1)||chr(5)||'ddd') ;

: SELECT * from badlog;

: LAST_LINE
: --------------------
: eee<01><05>ddd --- modified to not post binary 01 and 05 in case
: that


: 1 row selected.

: select rawtohex(last_line) from badlog ;
: RAWTOHEX(LAST_LINE)
: --------------------------------
: 6565650105646464 --- you can see they are real binary values.


: 1 row selected.

: I would not recomend this, but it works. Displaying the result will
: depend heavily on your character set.
: Ed

I wonder what happens if you insert a chr() into a utf-8 character string.
I have no way to test this.

E.g. if the database uses utf-8 and s is a varchar column

insert into mytbl (s) values (chr(244));
select rawtohex(s) from mytbl;

will that show one byte, value F4, or multiple bytes ( 0xbf 0xc2 I
believe).

???



Reply With Quote
  #15  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: In what type in Oracle it is possible to write down binary <8bit? - 10-07-2008 , 07:59 PM



Ed Prochak (edprochak (AT) gmail (DOT) com) wrote:
: On Oct 3, 5:47=A0am, "gym dot scuba dot kennedy at gmail"
: <kenned... (AT) verizon (DOT) net> wrote:
: > <mmf.stave... (AT) gmail (DOT) com> wrote in message
: >
: > news:e0ff1b3e-4f77-41dd-b628-4123954f2b47 (AT) s50g2000hsb (DOT) googlegroups.com...=
: > Hello,
: >
: > > In what type in Oracle it is possible to write down binary <8bit?
: >
: > > Thanks,
: >
: > > St. Mr
: >
: > That would be a raw column or a blob column depending upon size.
: > Jim

: Actually nothing stops you from inserting nonprintable ascii
: characters in a VARCHAR2 column.
: [Speaking from the experience of an ASCII nul (0) inserted in VARCHAR2
: by a C program.]

: I have a table badlog with column
: last_line VARCHAR2(100);

: insert into badlog values ('eee'||chr(1)||chr(5)||'ddd') ;

: SELECT * from badlog;

: LAST_LINE
: --------------------
: eee<01><05>ddd --- modified to not post binary 01 and 05 in case
: that


: 1 row selected.

: select rawtohex(last_line) from badlog ;
: RAWTOHEX(LAST_LINE)
: --------------------------------
: 6565650105646464 --- you can see they are real binary values.


: 1 row selected.

: I would not recomend this, but it works. Displaying the result will
: depend heavily on your character set.
: Ed

I wonder what happens if you insert a chr() into a utf-8 character string.
I have no way to test this.

E.g. if the database uses utf-8 and s is a varchar column

insert into mytbl (s) values (chr(244));
select rawtohex(s) from mytbl;

will that show one byte, value F4, or multiple bytes ( 0xbf 0xc2 I
believe).

???



Reply With Quote
  #16  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: In what type in Oracle it is possible to write down binary <8bit? - 10-07-2008 , 07:59 PM



Ed Prochak (edprochak (AT) gmail (DOT) com) wrote:
: On Oct 3, 5:47=A0am, "gym dot scuba dot kennedy at gmail"
: <kenned... (AT) verizon (DOT) net> wrote:
: > <mmf.stave... (AT) gmail (DOT) com> wrote in message
: >
: > news:e0ff1b3e-4f77-41dd-b628-4123954f2b47 (AT) s50g2000hsb (DOT) googlegroups.com...=
: > Hello,
: >
: > > In what type in Oracle it is possible to write down binary <8bit?
: >
: > > Thanks,
: >
: > > St. Mr
: >
: > That would be a raw column or a blob column depending upon size.
: > Jim

: Actually nothing stops you from inserting nonprintable ascii
: characters in a VARCHAR2 column.
: [Speaking from the experience of an ASCII nul (0) inserted in VARCHAR2
: by a C program.]

: I have a table badlog with column
: last_line VARCHAR2(100);

: insert into badlog values ('eee'||chr(1)||chr(5)||'ddd') ;

: SELECT * from badlog;

: LAST_LINE
: --------------------
: eee<01><05>ddd --- modified to not post binary 01 and 05 in case
: that


: 1 row selected.

: select rawtohex(last_line) from badlog ;
: RAWTOHEX(LAST_LINE)
: --------------------------------
: 6565650105646464 --- you can see they are real binary values.


: 1 row selected.

: I would not recomend this, but it works. Displaying the result will
: depend heavily on your character set.
: Ed

I wonder what happens if you insert a chr() into a utf-8 character string.
I have no way to test this.

E.g. if the database uses utf-8 and s is a varchar column

insert into mytbl (s) values (chr(244));
select rawtohex(s) from mytbl;

will that show one byte, value F4, or multiple bytes ( 0xbf 0xc2 I
believe).

???



Reply With Quote
  #17  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: In what type in Oracle it is possible to write down binary <8bit? - 10-07-2008 , 07:59 PM



Ed Prochak (edprochak (AT) gmail (DOT) com) wrote:
: On Oct 3, 5:47=A0am, "gym dot scuba dot kennedy at gmail"
: <kenned... (AT) verizon (DOT) net> wrote:
: > <mmf.stave... (AT) gmail (DOT) com> wrote in message
: >
: > news:e0ff1b3e-4f77-41dd-b628-4123954f2b47 (AT) s50g2000hsb (DOT) googlegroups.com...=
: > Hello,
: >
: > > In what type in Oracle it is possible to write down binary <8bit?
: >
: > > Thanks,
: >
: > > St. Mr
: >
: > That would be a raw column or a blob column depending upon size.
: > Jim

: Actually nothing stops you from inserting nonprintable ascii
: characters in a VARCHAR2 column.
: [Speaking from the experience of an ASCII nul (0) inserted in VARCHAR2
: by a C program.]

: I have a table badlog with column
: last_line VARCHAR2(100);

: insert into badlog values ('eee'||chr(1)||chr(5)||'ddd') ;

: SELECT * from badlog;

: LAST_LINE
: --------------------
: eee<01><05>ddd --- modified to not post binary 01 and 05 in case
: that


: 1 row selected.

: select rawtohex(last_line) from badlog ;
: RAWTOHEX(LAST_LINE)
: --------------------------------
: 6565650105646464 --- you can see they are real binary values.


: 1 row selected.

: I would not recomend this, but it works. Displaying the result will
: depend heavily on your character set.
: Ed

I wonder what happens if you insert a chr() into a utf-8 character string.
I have no way to test this.

E.g. if the database uses utf-8 and s is a varchar column

insert into mytbl (s) values (chr(244));
select rawtohex(s) from mytbl;

will that show one byte, value F4, or multiple bytes ( 0xbf 0xc2 I
believe).

???



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.