List:General Discussion« Previous MessageNext Message »
From:Ed Reed Date:March 24 2005 9:02pm
Subject:Re: a very tricky string extraction
View as plain text  
Sorry everyone for not being more clear. The field IS in a multiline
varchar field. The example data was all from one record in the table.
 
Unfortunately, this is a database that has been around for many years
and backward compatibility with other apps limits redesigning the table.
It is a Comments field and this is the first time anyone has ever tried
to mine any data from it. My app is a generic report writer that simply
takes and query string and returns the results. No processing of the
data can be done in the app. I need the result to come directly from
MySQL.
 
Thanks again.
 
- Ed

>>> Keith Ivey <keith@stripped> 3/24/05 12:04 PM >>>
Dan Nelson wrote:

> How about:
> 
> SELECT LEFT(description, 8) FROM mytable WHERE description LIKE
"%tested this%" LIMIT 1

Hmm, I assumed he was talking about a multi-line VARCHAR, but 
now that I look again Dan's interpretation is probably the right 
one. My previous message doesn't apply (except for the bit 
about breaking it into columns if you're doing it regularly).

-- 
Keith Ivey < keith@stripped >
Smokefree DC
http://www.smokefreedc.org 
Washington, DC


Thread
a very tricky string extractionEd Reed24 Mar
  • Re: a very tricky string extractionDan Nelson24 Mar
    • Re: a very tricky string extractionKeith Ivey24 Mar
  • Re: a very tricky string extractionKeith Ivey24 Mar
  • Re: a very tricky string extractionJoerg Bruehe24 Mar
  • Re: a very tricky string extractionSGreen24 Mar
RE: a very tricky string extractionJay Blanchard24 Mar
RE: a very tricky string extractionJay Blanchard24 Mar
Re: a very tricky string extractionEd Reed24 Mar
  • Re: a very tricky string extractionSGreen24 Mar
Re: a very tricky string extractionEd Reed24 Mar
  • Re: a very tricky string extractionEamon Daly24 Mar
    • Re: a very tricky string extractionKeith Ivey24 Mar
  • Re: a very tricky string extractionEamon Daly25 Mar
Re: a very tricky string extractionEd Reed24 Mar