Answer the question
In order to leave comments, you need to log in
How to select a number from the data listed separated by commas?
I have a table dbo_scale with row scale where there is an entry 0,1,2,3,4,5,6,7,8 . And there is a table dbo_grade with a row finalgrade value 5 . I need to output a number from scale , which will be the fifth in a row, i.e. "4".
Answer the question
In order to leave comments, you need to log in
SELECT
RIGHT(
SUBSTRING_INDEX(`dbo_scale`.`scale`, ',', dbo_grade.`finalgrade`),
LENGTH(dbo_grade.`finalgrade`)
)
FROM
`dbo_scale`
JOIN `dbo_grade`
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question