Help for this page

Select Code to Download


  1. or download this
    select count(distinct hostname) as unique_hostnames, 
           count(*) as record_count
    from my_table 
    where clean_hostname is null
    
  2. or download this
    select hostname, count(*) cnt
    from the_table 
    where clean_hostname is null
    group by hostname
    order by count(*) desc
    
  3. or download this
    update my_table set clean_hostname = hostname, confidence=100.0
    where hostname in ('first.correct.host', 'second.correct.host', <etc>)
    or hostname like '%.mybiz.com'
    or hostname like '%.joescompany.net'
    
  4. or download this
    update my_table set clean_hostname = '*GARBAGE*', confidence=100.0
    where hostname in ('first.correct.host', 'second.correct.host', <etc>)
    or hostname like '%.spamzalot.foo'
    
  5. or download this
    update my_table set clean_hostname = hostname||'houston.com', confiden
    +ce=95.0
    where hostname like '%.q9ix'