Re: concatenate RAW data in PL/SQL with R7.3.2

From: Scott Urman <surman_at_dlsun338.us.oracle.com>
Date: 1996/08/29
Message-ID: <504ii8$41n_at_inet-nntp-gw-1.us.oracle.com>#1/1


In article <x6eraoqs58l.fsf_at_mdt26awm.i-have-a-misconfigured-system-so-shoot-me>, mtsao_at_cas.org writes:
|>
|> In PL/SQL there are concatenation operator and function for VARCHAR2
|> datatype and its subtype -- "||", concat() -- to put string together
|> such as:
|>
|> DECLARE
|> string1 VARCHAR(10) := 'one';
|> string2 VARCHAR(10) := ' piece';
|> string3 VARCHAR(20);
|> BEGIN
|> string3 := string1 || string2;
|> END
|>
|>
|> but there is no such such built-in function for RAW datatype.
|>
|> Is there any techniques available in PL/SQL to concatenate RAW datatype ?

Not really. But you can convert RAW values to VARCHAR2 using the RAWTOHEX function, and vice versa using HEXTORAW. The raw values are represented as hex strings, with 2 hex characters for each bit. Thus the VARCHAR2 values have to be twice as long as their RAW counterparts.

|>
|> Thanks in advance, Ming Tsao
|> --



Scott Urman Oracle Corporation surman_at_us.oracle.com

Author of _Oracle PL/SQL Programming_ ISBN 0-07-882176-2 Published by Oracle Press - http://www.osborne.com/oracle/index.htm

"The opinions expressed here are my own, and are not necessarily that of  Oracle Corporation"
Received on Thu Aug 29 1996 - 00:00:00 CEST

Original text of this message