SELECT counting chars with LEFT()

2006-09-06 Thread spacemarc
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 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: SELECT counting chars with LEFT()

2006-09-06 Thread Miles Thompson
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

Re: SELECT counting chars with LEFT()

2006-09-06 Thread spacemarc
2006/9/6, Miles Thompson [EMAIL PROTECTED]: 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

RE: SELECT counting chars with LEFT()

2006-09-06 Thread Bill Tantzen
: SELECT counting chars with LEFT() 2006/9/6, Miles Thompson [EMAIL PROTECTED]: 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

Re: SELECT counting chars with LEFT()

2006-09-06 Thread ESV Media GmbH
Hello MySQL-User, i need your help with the following query. I want to get the next birthdays of my friends, but not only the one of this year. So when im in december ( or november ) i want to see the birthdays of next year too With my query i only see the birthdays of this year : SELECT

Re: SELECT counting chars with LEFT()

2006-09-06 Thread spacemarc
2006/9/6, Bill Tantzen [EMAIL PROTECTED]: You are actually selecting fieldA twice -- the first time (with '*') will return the entire column. The second time with only the first 20 chars. If you only want to see the first 20 chars, you will have to explicitly name every column in your select