表1 a b c
x^y 45 45
a^b 89 56表2 a1 b1 c1
x y 88
a b 56把表2的:a1^a2 连接起来。插进表1的a列,并检查a1^a2在表1中是否存在,如果存在就不用插入了。这条语句应该怎样写?
x^y 45 45
a^b 89 56表2 a1 b1 c1
x y 88
a b 56把表2的:a1^a2 连接起来。插进表1的a列,并检查a1^a2在表1中是否存在,如果存在就不用插入了。这条语句应该怎样写?
--?
insert into 表1(a)
select a1+'^'+b1 from 表2
where a1+'^'+b1 not in(select a from 表1)
String or binary data would be truncated.
The statement has been terminated.
select a1+'^'+b1 from 表2
where a1+'^'+b1 not in(select a from 表1)问个问题哦,表2一共三列,两列合并成一列插入到表一里面,那表一岂不是要空一列
rtrim(ltrim(a1))+'^'+rtrim(ltrim(b1))