Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    35

    Unanswered: wild card in pl/sql?

    any idea what is the syntax for wildcard in pl/sql?
    for sql i know is %. but i am getting data from a .csv file.
    for eg:
    abc varchar2(10):='ABCDEF';
    if abc like 'ABC' then
    .....
    end if;

    what is the syntax in it?
    thanks

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Why didn't you try it?
    Code:
    SQL_> DECLARE
      2     abc   VARCHAR2 (10) := 'abcdefg';
      3  BEGIN
      4     IF abc LIKE 'abc%'
      5     THEN
      6        DBMS_OUTPUT.put_line ('Right');
      7     ELSE
      8        DBMS_OUTPUT.put_line ('Wrong');
      9     END IF;
     10  END;
     11  /
    Right
    
    PL/SQL procedure successfully completed.
    
    SQL_>
    Is this what you're looking for?

  3. #3
    Join Date
    Nov 2004
    Posts
    35
    haha.. i also just got it..
    thanks anyway..
    so stupid of me to forget the % sign...

Posting Permissions

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