Match two mysql cols on alpha chars (ignoring numbers in same field) -


I was thinking that you know in a way that I can filter out a mysql query from only specific ' Alpha 'characters can be shown

then

  select table1, col2, ** alpha_chars_only (col3) ** table by  

Looking to update selection only.

I'm looking at some reges, but whatever luck came up without a lot of luck was searching for fields that have only .

In the very underwater context ... I have col1 in which ABC and two are included abc123 and I want them to match only alpha characters. Any letter or number can be.

Any help is very welcome

You have to type a custom function for it. If you want to do this in MySQL, you can create a stored task like this:

  DELIMITER drop function if exists, alpha_churs_ only $$ function creates alpha_chars_only (p_string text) text begins V_return_val declare the text default ''; Declared v_iter int unsigned default 1; Declared v_length int unsigned default 0; V_char char declared (1) default faucet; Set v_length = char_length (p_string); While (v_iter = l_f_type = v_length) set v_char = substring (p_string, v_iter, 1); If (v_char REGEXP '[a-z]') then set v_return_val = concat (v_return_val, v_char); end if; Set v_iter = v_iter + 1; End time; Return v_return_val; End $$ DELIMITER;  

Comments