At 10:55 AM 9/6/2006, spacemarc wrote:

Hi,
I want to get all records from Tab1 and the first 20 words for the fieldA

SELECT *, LEFT(fieldA, 20) AS fieldA FROM Tab1....

But this query does not work: why?

thanks!

--
http://www.spacemarc.it

First of all - please reply to the list ..

I thought you wanted all fields, that's the way your SELECT statement is constructed. If just the first 20 char from fieldA, then ...
        SELECT LEFT(fieldA, 20) AS fieldA FROM Tab1
should do what you want. Again, check the syntax for LEFT() in the MySQL docs.

Miles

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.7/438 - Release Date: 9/5/2006



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

Reply via email to