This discussion is archived
6 Replies Latest reply: Jul 29, 2013 6:16 AM by chris227 RSS

pattern matching

981609 Newbie
Currently Being Moderated

Can some show me a SQL where I can get JUST one of these rows back at a time.



SQL> desc t1;
Name                                      Null?    Type
----------------------------------------- -------- ----------------------------
VAL                                                VARCHAR2(20)

insert into t1 values ('ABC_BKPSTBY_P');
insert into t1 values ('ABC_BKP_P');


# This returns 2 rows NO good.

SQL> select val from t1 where val like '%BKP%';


# This returns no rows, no good


SQL> select val from t1 where val like '%BKP';

no rows selected



Thanks to all who answer


  • Correct Answers - 10 points
  • Helpful Answers - 5 points