I have an SQLite table where a column is of type 'text'. Each item in that column is program code. I want to find out how many lines each text item is. i.e. The following should be 3 lines:
program "help"
print "Help"
return.
You can count the \ns by doing
LENGTH(TheColumn) - LENGTH(REPLACE(TheColumn, X'0A', '')) + 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With