Re: [sqlite] Re versing Text not Numbers

2011-12-09 Thread Igor Tandetnik
Macgyver7 wrote: > I tried the case function that was recommended, but that seems to recognise > everything in the column as text This means that everything in the column is in fact text. You do realize that '123' is not the same thing as 123, right? > except when

Re: [sqlite] Re versing Text not Numbers

2011-12-09 Thread Macgyver7
Igor Tandetnik wrote: > > > 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; > > I tried the case function

Re: [sqlite] Re versing Text not Numbers

2011-12-02 Thread Macgyver7
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 wrote: >> I have a column of text that has numbers in some fields and words in >> others. >> I need to reverse

Re: [sqlite] Re versing Text not Numbers

2011-12-02 Thread Igor Tandetnik
Macgyver7 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

[sqlite] Re versing Text not Numbers

2011-12-02 Thread Macgyver7
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