On 7 Feb 2011, at 8:38am, Harish CS wrote: > Table T has two varchar columns A and B. UI allows entering values into > column A only. > On insert/update of records, I need to take out the value of A, filter out > anything other than '0' to '9', '*', '#', '+' 'p', 'w' characters and copy > it to column B. Is it possible to write a trigger to achieve this? If yes > please give me a sample. (Also, if column B is in another table, is it > possible?)
I don't think you need a trigger. You might find the 'trim(X,Y)' function from http://www.sqlite.org/lang_corefunc.html helpful. You'll have to list all characters you /don't/ want left in the string. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users