Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Android Contacts – Remove Spaces / Line Breaks From Postal Address

Posted on February 21, 2014October 26, 2015 By David Kittell
UPDATE data
SET data1 = ltrim(ifnull(data4, '') || ' ' || ifnull(data5, '') || ' ' || ifnull(data6, '') || ' ' || ifnull(data7, '') || ' ' || ifnull(data8, '') || ' ' || ifnull(data9, '') || ' ' || ifnull(data10, ''))
WHERE mimetype_id IN (
		SELECT _id
		FROM mimetypes
		WHERE mimetype LIKE "%postal%"
		);
UPDATE data
SET data1 = REPLACE(replace(REPLACE(data1, x'0D0A', x'0A'), x'0D', x'0A'), x'0A', ' ')
WHERE mimetype_id IN (
		SELECT _id
		FROM mimetypes
		WHERE mimetype LIKE "%postal%"
		);
Originally Posted on February 21, 2014
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Android SQLite Code SQL SQLite

Post navigation

Previous post
Next post

Related Posts

Find Table Differences And Sync Tables

Posted on May 26, 2015October 26, 2015

Have two databases with the same table schema and need to keep both up to date? First, let us look at the differences between the two databases. The query below will show the differences between the development database table tbl_zip_code and the production database table tbl_zip_code. Ideally the differences should…

Read More

UNIX – Create Sudoers Access

Posted on August 5, 2016August 5, 2016

# Variables – Start username="dkittell" # Variables – Stop su # type in sudo password chmod -v +w /etc/sudoers && echo -e "$username ALL=(ALL) ALL" >> /etc/sudoers && chmod -v -w /etc/sudoers # Variables – Start username="dkittell" # Variables – Stop su # type in sudo password # Remove Sudoers…

Read More

Mac OSX Terminal – Rename TTF/OTF Fonts

Posted on January 18, 2018

If you have ever received a list of fonts from a client where the font names didn’t make sense this code below will help. Caution: Backup your fonts directory just in case. #!/bin/sh # RenameFonts.sh # # # Created by David Kittell on 1/18/18. # # Use script like "sh…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes