Get first character of SQL column

1129475 pts.
Tags:
SQL
String
Currently in SQL, I have a column with a length of 6. In that specific column, I need to get only the first character. How can I do that? Is there a SQL String function?
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

The syntax may be different depending on the version of SQL you are using.

This is a sample

SUBSTR(FN,S,L)   Where FN = field name,  S = Starting position, L = Length

For you it would be:  SUBSTR(1st_field,1,1)

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: