This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

CONTAINS keyword in SQL  RSS feed

 
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!