Re: How to assign a value to a variable

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Wed, 22 Oct 2003 15:53:41 -0700
Message-ID: <1066863234.866644_at_yasure>


Florian Marinoiu wrote:

>Hi,
>
>I have the following MS-SQL Server statement that I want to convert to
>ORACLE 8.1
>SET _at_pPhone = '%' + @pPhone + '%'
>
>In ORACLE I tried
>SELECT '%' || pPhone || '%' into pPhone from dual;
>
>Where pPhone is a parameter that is passed to the procedure.
>
>How could I do it?
>
>Is it a set in ORACLE?
>
>Thanks,
>Florian
>
>
>
It would be helpful to know what you expect as the result since '%' is a wildcard in Oracle.

But to accomplish what you appear to want ...

pPhone := '%' || pPhone || '%';

And please do not cross-post. One, appropriate, group is enough.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Thu Oct 23 2003 - 00:53:41 CEST

Original text of this message