Re: How to extract only the first few lines from a longtext field

2005-05-09 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, symbulos <[EMAIL PROTECTED]> writes: > 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 ... >> >

Re: How to extract only the first few lines from a longtext field

2005-05-09 Thread symbulos
Thanks for the very useful suggestions! I was thinking of adding a simple check to search for the first "full stop" after the count of words. It sounded sensible in the case where people want to have a full sententences, not interrupted in the middle. -- MySQL General Mailing List For list ar

Re: How to extract only the first few lines from a longtext field

2005-05-09 Thread Michael Stassen
Christian Meisinger 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(ar

Re: How to extract only the first few lines from a longtext field

2005-05-09 Thread Christian Meisinger
>>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(arti

Re: How to extract only the first few lines from a longtext field

2005-05-09 Thread symbulos
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 > separ

Re: How to extract only the first few lines from a longtext field

2005-05-09 Thread Roger Baklund
symbulos wrote: how do you extract with a query only the first few lines from a blob field? For instance: you have an article stored in the field. You would like to visualise the first few lines before reading it all. You could use the LEFT() function to return for instance the 200 first characte

How to extract only the first few lines from a longtext field

2005-05-09 Thread symbulos
Dear friends, how do you extract with a query only the first few lines from a blob field? For instance: you have an article stored in the field. You would like to visualise the first few lines before reading it all. Thanks in advance. -- symbulos - ethical services for your organisation websit