WinSQL User's Guide
WinSQL User's Guide

Handling New Line characters

Database rows can often contain embedded new line characters. Since a new line (CHAR (13) + CHAR (10)) character has a special meaning in SQL, they must be handled differently when such characters appear in the actual data.

The following table describes each of these options:

 

Option

Description

Replace with

CHAR(13) +

CHAR(10)

This is the default option and will replace all new line characters with an ODBC compliant function call.

Example: Let’s say a field contains the following data.

1 Main Street

Suite 130

This data will be converted to

'1 Main Street' + {fn CHAR(13)} + {fn CHAR(10)} + ‘Suite 130’

Notice the {fn CHAR(13)} statement, which represents an ODBC escape sequence for representing ASCII 13 and 10 characters.

Print as-is

Choosing this option will print the new line characters as-is, meaning the actual INSERT statement may appear in multiple lines.

Ignore

This option will ignore every row that has a new line character.

Comment out

This option will write the rows to the output, but these rows will be commented out. You can later uncomment them and run them manually.