LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-16-2002, 10:25 PM   #1
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
SQL and searching question


lets say i have a field in a database called comments that is anything from NULL to a paragraph. I would assume a CLOB or BLOB would be in order as far as a dataype. My question is how do i perform a query that will search for part of something in a BLOB or CLOB or even a CHAR(20) ?

basically how do i return the entire entry below when im searching based on the word 'Robert':

<begin data>

If I were anyone in the world I would be Robert.

</end data>


BTW, incase its database dependant, the database im using is MySQL
 
Old 08-17-2002, 04:51 PM   #2
gdrobson
Member
 
Registered: Jun 2002
Location: Ontario, Canada
Distribution: RH8.0
Posts: 65

Rep: Reputation: 15
http://www.mysql.com/doc/en/Pattern_matching.html
 
Old 08-17-2002, 04:53 PM   #3
gdrobson
Member
 
Registered: Jun 2002
Location: Ontario, Canada
Distribution: RH8.0
Posts: 65

Rep: Reputation: 15
oops, i was also going to say you would want i believe anyway a query that looked like:

mysql> SELECT <column> FROM <table> WHERE <column> LIKE "%Robert%";
 
Old 08-18-2002, 11:34 PM   #4
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Original Poster
Rep: Reputation: 47
oh sweet, i looked at the page, mysql uses REGEX's too!!
now i can use all taht regex stuff i learned in my last CS class
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sql plus question puishor Linux - Software 3 10-23-2005 02:09 PM
basic question about searching files balteo Linux - Newbie 1 09-03-2005 07:38 PM
SQL question jpc82 Programming 5 08-13-2005 11:05 AM
searching and hashtable question. blackzone Programming 1 11-16-2004 02:13 AM
SQL Question jacksmash Programming 7 01-18-2004 10:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration