Thank you for that, I hadn't been able to find a function, I will have to explore the link you posted.
Cheers, Tim. Igor Tandetnik wrote: > > Macgyver7 <t...@buffaloriverforge.com> wrote: >> I have a column of text that has numbers in some fields and words in >> others. >> I need to reverse the letter order of the text eg. 'abcde' becomes >> 'edcba' >> without changing the order of the fields with numbers. How do I reverse >> the >> letter order and how do I avoid doing that to the numbers as well? > > There is no built-in reverse() function. You'll have to write your own: > > http://www.sqlite.org/c3ref/create_function.html > > That function can also check the type of its parameter and return it > unchanged if it's not a string. Or, you could do that in SQL: > > select (case when typeof(field) = 'text' then reverse(field) else field > end) > from myTable; > > -- > Igor Tandetnik > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > -- View this message in context: http://old.nabble.com/Reversing-Text-not-Numbers-tp32906645p32906707.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users