I want to select a field from table and substring it.
For example:
VAN1031 --> 1031
I tried this, but is improper syntax:
SELECT SUBSTR(R.regnumber,3,3) from registration R
How can this be done?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t need the third argument (length) if you want to select all the characters to the right of a specific index:
I also changed the start index to 4 because in SQL strings are 1-indexed and not 0-indexed as they are in many popular programming languages.