Good Day All,

Let's say I have a paragraph within a field name [summary]

=========================================================
United States jets reportedly continued bombing targets Thursday
in Kandahar, and United States special forces were on the ground
coordinating with ethnic Pashtun tribal leaders, Franks
said. But the Taliban still held the city, tribal leaders
said Thursday.
       “The Taliban still have their own stable government
in Kandahar province,” Mullah Malung, a former commander
of Kandahar, told reporters after a meeting of tribal chiefs.
       The chiefs warned the Northern Alliance, which has
seized most of the north of the country, to stay away from
Kandahar. “We will never let them come and take the city,”
Malung said.
=========================================================

What I am trying to do is to to grab all text up to a the
FIRST period in a sentence, but this doesn't work in mySQL..

mysql> SELECT LEFT(summary, LOCATE('.', summary, 0)) summary
   --> FROM tableName;

but this doesn't work.  So I tried POSITION...

mysql> SELECT LEFT(summary, POSTION('.', summary) summary
   --> FROM tableName;

And this doesn't work either, but when I do something like..

mysql> SELECT LOCATE('.', summary, 0) summary FROM tableName;

Then it returns a numerical value according to the documentation...

Is this possible?

What this query should return is everything up to "Franks said"

TIA

Christopher Oson


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to