Question & Answer
Question
How do you insert a newline / carriage return into a character field in dbaccess?
Cause
Sometimes there is the need to insert a newline / carriage return character into a character (varchar, lvarchar, etc.) column of a table to reflect a paragraph type format.
Answer
Within dbaccess or the ISQL menu, one could use the following steps to accomplish this:
create table t2 (c1 lvarchar);
insert into t2 values ('test'||chr(10)||chr(13)||'more test');
Selecting the data within dbaccess, one can see that the newline / carriage return is in the table by viewing the output format of the following select statement:
select * from t1;
c1 test
more test
1 row(s) retrieved.
Was this topic helpful?
Document Information
Modified date:
20 January 2022
UID
swg21686620