Re: ** LIKE with RAW

  • From: A Joshi <ajoshi977@xxxxxxxxx>
  • To: afatkulin@xxxxxxxxx
  • Date: Wed, 31 Dec 2008 16:38:34 -0800 (PST)

Alex,

   Thanks. What I did is select and then do a LIKE : so in your example it will 
be : 



select *
  2     from r
  3     where r like '7261772076616C756'||'%';

Obviously : some issue with that. So I will try to do a double conversion.   

Can you tell how I can convert  
'7261772076616C7565' to 'raw value'. 
Thanks

--- On Sun, 12/28/08, Alex Fatkulin <afatkulin@xxxxxxxxx> wrote:
From: Alex Fatkulin <afatkulin@xxxxxxxxx>
Subject: Re: ** LIKE with RAW
To: ajoshi977@xxxxxxxxx
Cc: "oracle-l" <oracle-l@xxxxxxxxxxxxx>
Date: Sunday, December 28, 2008, 12:37 PM

It is would be nice if you could provide an example, but I'll take a
bet and guess that you're stuffing % in a wrong place...

it works

SQL> create table r (r raw(32));

Table created.

SQL> insert into r values (utl_raw.cast_to_raw('raw value'));

1 row created.

SQL> insert into r values (utl_raw.cast_to_raw('raw value again'));

1 row created.

SQL> commit;

Commit complete.

SQL> select *
  2     from r
  3     where r like utl_raw.cast_to_raw('raw')||'%';

R
------------------------------------------------------
7261772076616C756520616761696E
7261772076616C7565


On Sun, Dec 28, 2008 at 12:17 PM, A Joshi <ajoshi977@xxxxxxxxx> wrote:
>
> Hi,
>    I have a column with datatype RAW. I can select the data and search
using
> = . When try to select using LIKE : it does not work and it does not
return
> any rows. Is there a way I can use LIKE. Thanks
>
> * I do a select to get the data and then from the data returned : do a
> select using LIKE and it does not return rows. Thanks for help.
>
>



-- 
Alex Fatkulin,
http://www.linkedin.com/in/alexfatkulin
--
//www.freelists.org/webpage/oracle-l





      

Other related posts: