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