Diary of ataicha: ataicha SQL QUERY

it all about me......

Recent

test
Showing posts with label ataicha SQL QUERY. Show all posts
Showing posts with label ataicha SQL QUERY. Show all posts

Thursday, April 19, 2018

Removing Line Breaks or New Line Characters in a SQL Query

Thursday, April 19, 2018 0
Removing Line Breaks or New Line Characters in a SQL Query
So ni solution untuk remove atau replace line breaks or new line characters dalam SQL Query.
SQL Query : SELECT REPLACE( REPLACE (`FIELDNAME`, CHAR(13), '  '), CHAR(10), '  ') AS `remarks` from TABLENAME;
Yang mana REPLACE ni akan replace CHAR(13) dan CHAR(10) dengan ' '.

- For ataicha REFERENCE PURPOSE.

REFERENCES : http://blogs.catapultsystems.com/rhutton/archive/2013/10/03/removing-line-breaks-or-new-line-characters-in-a-sql-query/