eksob
11-10-2005, 05:44 PM
I need the select statement that will select the first 3 characters of the field.
For instance:
Field1 = 123,345
Field2 = 123,980
Field3 = 234,487
Field4 = 456,1234
Field5 = 1234,7863
I want to select the first (LEFT) 3 characters that are equal to "123"...So technically Field1, Field2, Field5 would be retreived.
I am an avid programmer in PHP, learning ASP (server doesn't support .NET)...anyways this is what the select statement would look like in PHP:
SELECT id, name, LEFT(comments, 25) FROM comments ORDER BY cdate DESC LIMIT 5;
Thanks for the help in advance
For instance:
Field1 = 123,345
Field2 = 123,980
Field3 = 234,487
Field4 = 456,1234
Field5 = 1234,7863
I want to select the first (LEFT) 3 characters that are equal to "123"...So technically Field1, Field2, Field5 would be retreived.
I am an avid programmer in PHP, learning ASP (server doesn't support .NET)...anyways this is what the select statement would look like in PHP:
SELECT id, name, LEFT(comments, 25) FROM comments ORDER BY cdate DESC LIMIT 5;
Thanks for the help in advance