|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
In my table I have
FIELD1 The data in FIELD1 looks like: aaaa, bbbb, cccc A list of items separated by commas. I need to create an SQL statement: SELECT * from MYTABLE where FIELD1 contains 'aaaa' But contains is not an operator. I need something like contains. I need to have it match if the string is part of that field. |
|
#2
|
||||
|
||||
|
You can use something like:
Code:
select ename from scott.emp where instr(ename, 'A', 1, 1) < > 0; or Code:
select ename from scott.emp where ename like '%A%';
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) Understanding SQL Joins An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries |
|
#3
|
|||
|
|||
|
Thanks! that works - the LIKE command
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > SELECT Statement help - field containing ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|