SQL QUERY

R

Rodrigo Ferreira

Hello,

I have a little problem with my sql query.

The query is: "SELECT field1, field2 FROM table1 ORDER BY 2 desc"

I want to catch only 15 chars of the field 2. Anyone knows how to do that?



Greetings,

Rodrigo Ferreira
 
J

John Spencer

In Access? The first 15 characters would be

SELECT Field1, Left(Field2,15)
FROM Table1
ORDER BY Left(Field2,15)

If you want something other than the first 15 characters then you will
probably need to use the Mid or Right functions.
 
Top