SQL QUERY

  • Thread starter Thread starter Rodrigo Ferreira
  • Start date Start date
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top