How to convert a string to number in SQLITE 3 ? Example: How to convert 2020/2 to 2020?

Asked

Viewed 12 times

0

How to convert a string to number in SQLITE 3 ? Example: How to convert 2020/2 in 2020 so that when using the condition WHERE periodo < 2014 will return only periods shorter than 2014?

1 answer

0

I got something:

Select

substr(periodo,1,4)||.0/10 as "periodo_numero"

from TabelaPeriodo
Where periodo_numero < 2014

Browser other questions tagged

You are not signed in. Login or sign up in order to post.