On Monday 09 May 2005 15:17, Roger Baklund wrote:
> You could use the LEFT() function to return for instance the 200 first
> characters:
>
> SELECT LEFT(article,200) AS start_of_article
>    FROM articletable WHERE ...
>
> You could also use the SUBSTRING_INDEX() function, if your lines are
> separated with \r\n:
>
> SELECT SUBSTRING_INDEX(article,'\r\n',2) AS two_first_lines
>    FROM articletable WHERE ...
>
> <URL: http://dev.mysql.com/doc/mysql/en/string-functions.html >

The problem of solution (2) is that the lines are not separated by any 
character, whilst the problem of solution (1) is that it could potentially 
break a word in the middle.

Is there a method which uses word counting?
-- 
symbulos - ethical services for your organisation
website www.symbulos.com


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to