DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Conditional Statement

  1. #1
    Join Date
    May 2004
    Location
    Brasil
    Posts
    4

    Conditional Statement

    I have one table and any columns. One column is varchar2(50) and your value can be null or letters. My problem is, when I use SELECT Statement this column with LIKE '%', values equal NULL no apeears.

    I can't do use this column is my WHERE clause.

    Somebody know I resolve this problem ?

    Victor Ramalho Peres

  2. #2
    Join Date
    Apr 2004
    Posts
    3
    Hi
    sample code to resolve your problem.


    select * from emp
    where nvl(ename,' ') like '%'

    above query will retreive both ename with null values and values.


    Thanks

  3. #3
    Join Date
    May 2004
    Location
    Brasil
    Posts
    4
    This is work corretly.
    Thanks of you help.

  4. #4
    Join Date
    May 2004
    Posts
    4
    What about this?

    select * from emp;

    (fewer characters, anyhow)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width