Search for words in db2 tables

by Hikkemikke Email

I just figured out a easy way to search for words in a database table.. using grep in *nix.. I SSH in to a db server, we use db2.. connect to the database and run a sql query.. to search for a particularly word just grep for it at the end..

[hikkemikke@linux hikkemikke]$ db2 "select * from db2table" |grep produkter

where produkter is the word I'm searching for.. probably a well known way to do it, but just figured it out by my self, so I'm documenting it..

2 comments

Comment from: Rune [Visitor] Email · http://hellem.org
Konge!!
2007-10-24 @ 22:52
Comment from: Hikkemikke [Member] Email · http://www.hikkemikke.com
takk.
2007-10-24 @ 23:13

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)