aspose file tools
The moose likes JDBC and the fly likes CONTAINS keyword in SQL Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "CONTAINS keyword in SQL" Watch "CONTAINS keyword in SQL" New topic
Author

CONTAINS keyword in SQL

Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
Does anyone happen to know if DB2 supports the CONTAINS keyword?
I can't seem to find any documentation on it in my book. If it is not
supported, what would a person use get the same results as if they were using the CONTAINS keyword?
Thanks for any help!
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

I don't know if it is supported in the same way you are wanting, but CONTAINS is a keyword. I found this in the documents provided by IBM. (Someday I am going to teach a 'How to search using Google' class ).
PDF Manual
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

wouldn't that just be accomplished using
"SELECT * FROM some_file WHERE some_field LIKE '%SOMESTRING%' "
the like operator would be the standard accross most databases. Is this what you wanted to accomplish?
Jamie
Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
When I use the keyword LIKE '%SEARCH CRITERIA%' it looks for the string in that order. I would like to search the column for 'search criteria' if it is in that order, or if one of the words is found anywhere in the column, not necessarily in that order.
Such as "I am doing a search for certain criteria." This will not show up in my results if I use the keyword LIKE.
m bhramaresh
Greenhorn

Joined: Jan 09, 2004
Posts: 13
sorry, actually, i didnt get the meaning of ur searching word,
actually "like", "in" keywords r there to search for a corresponding term.
go for their syntax, i think those may help u .
thnx
bhramaresh
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: CONTAINS keyword in SQL
 
Similar Threads
ByteCode
Legal Identifier
final and const
WA #1.....word association
Synchronized