Simon, As far as I am aware trim will remove the characters only in ends, not in the middle. Assume an input like "12venkatpw", this cannot be trimmed. Or am I wrong somewhere. Guess NO.
Thanks VENKAT Bug the Bugs. ________________________________ From: Simon Slavin <slav...@bigfraud.org> To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Sent: Mon, February 7, 2011 6:19:04 PM Subject: Re: [sqlite] Trigger to filter out characters On 7 Feb 2011, at 12:38pm, Harish CS wrote: > Thanks. Trim(X,Y) is useful but I need to remove anything other than '0' - ' > '9' and a few more characters. > 180+ characters need to be removed (filtered out). > So I will need to call Trim() so many times. > Since we cannot write loops I wonder how I can call it many times. No, you just call it once and list all those characters in the second parameter: UPDATE contacts SET phoneNumber to TRIM(rawPhoneNumber, 'abcdefghi ... xyz!@£$%^&()_-={}[]:"|;''\<>?,./') Note that as above to put an apostrophe inside an SQLite string you double-it. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users