/tmp>cat | dbaccess databasename
create table xx (
a char(20)
);
Table created.
insert into xx values ('a
b');
282: Found a quote for which there is no matching quote.
Error in line 1
Near character position 24
execute procedure ifx_allow_newline('t');
Routine executed.
insert into xx values ('a
b');
1 row(s) inserted.
select * from xx;
a
a
b
1 row(s) retrieved.
update xx set a = 'xx'
where a = 'a
b';
1 row(s) updated.
select * from xx;
a
xx
1 row(s) retrieved.
回复 #2 ivhb 的帖子
select * from xx where a .....什么条件才能查到带换行的 a。
也就是 换行符在 sql 中怎么写? 仔细看我的回复,不很清楚么?
回复 #4 ivhb 的帖子
update xx set a = 'xx'where a = 'a
b';
1 row(s) updated.
其中where a like 换行符。
现实中a的完整内容不可能知道。 原帖由 ok2ok 于 2007-11-16 12:29 发表 http://bbs.chinaunix.net/images/common/back.gif
update xx set a = 'xx'
where a = 'a
b';
1 row(s) updated.
其中where a like 换行符。
现实中a的完整内容不可能知道。
恩.你说得很对.用like,写法同上。
回复 #7 ivhb 的帖子
好像你搞错了。select 出a 字段中含义换行符的记录,没办法写! 请仔细看贴,动手实验一下。
对了,我不保证7.x的版本也能用。我是在IDS9.30.FC3 试验的。 插入三条记录:
insert into xx values ('ok');
insert into xx values ('a
b');
insert into xx values ('cd');
请问怎么写才能显示带换行符的记录。不要告诉我用 where a = 'a
b';
请指点
select * from xx where 。。。。。
页:
[1]
2