Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: <> '' in PL/SQL
Gennaro Napolitano <Gennaro.Napolitano_at_italdata.it> wrote:
> Hy Norris
>
> Try putting a space between the ''.
> Instead of :
> if abc <> '' then
> Use:
> if abc <> ' ' then
>
> Hope this helps
>
> Ciao Gennaro
>
> Norris wrote:
>
> > I am writing some simple PL/SQL , but I cannot intepret the result:
> >
> > set serveroutput on
> > declare
> > abc varchar2(1);
> > begin
> > abc := 'a';
> > if abc <> '' then
> > dbms_output.put_line(abc||' <> empty');
> > else
> > dbms_output.put_line(abc||' = empty');
> > end if;
> > end;
> >
> > The Result
> > ----------
> > ServerOutput ON
> > Statement processed.
> > a = empty
> >
> > --
> > - Have several nice days...
> > - Opinions are mine and do not necessarily reflect those of the Corp.
> > http://www.ntfaq.com
> > http://www.cyberport.com/~tangent/programming/winsock/
>
Hi,
You can try IS NULL or IS NOT NULL instead.
Hope that helps and let me know.
npaim_at_zaz.com.br Received on Tue Sep 14 1999 - 17:05:56 CDT
![]() |
![]() |