text: Q:
  
  Splitting letters and number in SQLite
  
  i have one column containing letters and numbers (mix/random)
  914103B01292AB21HRVH92665
  
  i need to split it like this
  914103012922192665 -numbers only
  BABHRVH            -letters only
  
  thanks in advance!
  
  A:
  
  The simplest way to do this in SQLite is with a series of REPLACE functions - like so:
  select replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(the_string, '0', ''),
                                                                                 '1', ''),
                                                                         '2', ''),
                                                                  '3', ''),
                                                         '4', ''),
                                                 '5', ''),
                                         '6', ''),
                                  '7', ''),
                           '8', ''),
                   '9', '') as letters_only,
    ...
  
  - with a similar series of 26 replace function calls to strip out the letters, leaving the numbers only.
  Alternatively, you could write a user-defined function to do this for you; this is a non-trivial exercise in SQLite - see this question.
  
  