如:
declare
c_CARDNO VARCHAR2(20):='00000000000000000000';
c_CARDPASS VARCHAR2(10):='0000000000';
begin
insert into T_CARD(FCARDNO,FCARDPASS,FBATCHCODE)
select c_CARDNO,c_CARDPASS,b.FBATCHCODE
from t_CardBatch b
end;
竟然在插入的时候出错
4 个解决方案
#1
insert into T_CARD(FCARDNO,FCARDPASS,FBATCHCODE)
select c_CARDNO,c_CARDPASS,b.FBATCHCODE
from t_CardBatch b
打''或者"",多试试
insert into T_CARD(FCARDNO,FCARDPASS,FBATCHCODE)
select 'c_CARDNO','c_CARDPASS',b.FBATCHCODE
from t_CardBatch b
select c_CARDNO,c_CARDPASS,b.FBATCHCODE
from t_CardBatch b
打''或者"",多试试
insert into T_CARD(FCARDNO,FCARDPASS,FBATCHCODE)
select 'c_CARDNO','c_CARDPASS',b.FBATCHCODE
from t_CardBatch b
#2
楼主语句没错,要在end前的语句后面加“;”
declare
c_CARDNO VARCHAR2(20):='00000000000000000000';
c_CARDPASS VARCHAR2(10):='0000000000';
begin
insert into T_CARD(FCARDNO,FCARDPASS,FBATCHCODE)
select c_CARDNO,c_CARDPASS,b.FBATCHCODE
from t_CardBatch b;
end;
还有就是你定义的长度不要超过你表中的字段长度
declare
c_CARDNO VARCHAR2(20):='00000000000000000000';
c_CARDPASS VARCHAR2(10):='0000000000';
begin
insert into T_CARD(FCARDNO,FCARDPASS,FBATCHCODE)
select c_CARDNO,c_CARDPASS,b.FBATCHCODE
from t_CardBatch b;
end;
还有就是你定义的长度不要超过你表中的字段长度
#3
另外你的结尾处的分号“;”是中文的,要用英文的
#4
报什么错误
#1
insert into T_CARD(FCARDNO,FCARDPASS,FBATCHCODE)
select c_CARDNO,c_CARDPASS,b.FBATCHCODE
from t_CardBatch b
打''或者"",多试试
insert into T_CARD(FCARDNO,FCARDPASS,FBATCHCODE)
select 'c_CARDNO','c_CARDPASS',b.FBATCHCODE
from t_CardBatch b
select c_CARDNO,c_CARDPASS,b.FBATCHCODE
from t_CardBatch b
打''或者"",多试试
insert into T_CARD(FCARDNO,FCARDPASS,FBATCHCODE)
select 'c_CARDNO','c_CARDPASS',b.FBATCHCODE
from t_CardBatch b
#2
楼主语句没错,要在end前的语句后面加“;”
declare
c_CARDNO VARCHAR2(20):='00000000000000000000';
c_CARDPASS VARCHAR2(10):='0000000000';
begin
insert into T_CARD(FCARDNO,FCARDPASS,FBATCHCODE)
select c_CARDNO,c_CARDPASS,b.FBATCHCODE
from t_CardBatch b;
end;
还有就是你定义的长度不要超过你表中的字段长度
declare
c_CARDNO VARCHAR2(20):='00000000000000000000';
c_CARDPASS VARCHAR2(10):='0000000000';
begin
insert into T_CARD(FCARDNO,FCARDPASS,FBATCHCODE)
select c_CARDNO,c_CARDPASS,b.FBATCHCODE
from t_CardBatch b;
end;
还有就是你定义的长度不要超过你表中的字段长度
#3
另外你的结尾处的分号“;”是中文的,要用英文的
#4
报什么错误