Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003
    Posts
    10

    Unanswered: Help on ACCEPT command

    i have to use the accept command. How do i raise an error if nothing is entered?

    e.g.

    test varchar2(10);
    test := '&enter something';

    if nothing is entered, how do i test this (just the return key is pressed)?
    i've tried
    if test = '' then.....
    but it doesn't work. are there any specific exceptions for this?

  2. #2
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    Er, I don't see you using the ACCEPT command...

  3. #3
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Quote Originally Posted by CookieMonster24
    if test = '' then.....
    No, that doesn't work in Oracle, because Oracle treats '' as a NULL. So you must do this:
    Code:
    if test is null then ...

Posting Permissions

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