6 个解决方案
#1
什么意思?你的查询语句呢?
该不会是 select * from kk09@dkk_v_yab139 ?
该不会是 select * from kk09@dkk_v_yab139 ?
#2
表名拼接要用动态语句
#3
select * from kk09@dkk_v_yab139 差不多这个样子,动态语句怎么写?这个不太明白,在网上找了很多资料,没看出来门道。
v_yab139这个字符串是个动态值,拼起来查询就是错误的。求大神指教!!!
v_yab139这个字符串是个动态值,拼起来查询就是错误的。求大神指教!!!
#4
execute immediate 'select * from kk09@dkk_'||v_yab139;
这样,你的固定的值在''里面,动态参数在外面,然后用||连接起来;
这样,你的固定的值在''里面,动态参数在外面,然后用||连接起来;
#5
@14982
execute immediate 'select count(*) into n_count from kk09@dkk_'||v_yab139 where yac005=v_yac005
ORA-06550: 第 39 行, 第 85 列:
PLS-00103: 出现符号 "WHERE"在需要下列之一时:
. ( * @ % & = - + ; < / >
at in is mod remainder not rem return returning
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between into using || bulk member submultiset
execute immediate 'select count(*) into n_count from kk09@dkk_'||v_yab139 where yac005=v_yac005
ORA-06550: 第 39 行, 第 85 列:
PLS-00103: 出现符号 "WHERE"在需要下列之一时:
. ( * @ % & = - + ; < / >
at in is mod remainder not rem return returning
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between into using || bulk member submultiset
#6
execute immediate 'select count(*) into n_count from kk09@dkk_'||v_yab139||'where yac005=v_yac005'
#1
什么意思?你的查询语句呢?
该不会是 select * from kk09@dkk_v_yab139 ?
该不会是 select * from kk09@dkk_v_yab139 ?
#2
表名拼接要用动态语句
#3
select * from kk09@dkk_v_yab139 差不多这个样子,动态语句怎么写?这个不太明白,在网上找了很多资料,没看出来门道。
v_yab139这个字符串是个动态值,拼起来查询就是错误的。求大神指教!!!
v_yab139这个字符串是个动态值,拼起来查询就是错误的。求大神指教!!!
#4
execute immediate 'select * from kk09@dkk_'||v_yab139;
这样,你的固定的值在''里面,动态参数在外面,然后用||连接起来;
这样,你的固定的值在''里面,动态参数在外面,然后用||连接起来;
#5
@14982
execute immediate 'select count(*) into n_count from kk09@dkk_'||v_yab139 where yac005=v_yac005
ORA-06550: 第 39 行, 第 85 列:
PLS-00103: 出现符号 "WHERE"在需要下列之一时:
. ( * @ % & = - + ; < / >
at in is mod remainder not rem return returning
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between into using || bulk member submultiset
execute immediate 'select count(*) into n_count from kk09@dkk_'||v_yab139 where yac005=v_yac005
ORA-06550: 第 39 行, 第 85 列:
PLS-00103: 出现符号 "WHERE"在需要下列之一时:
. ( * @ % & = - + ; < / >
at in is mod remainder not rem return returning
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between into using || bulk member submultiset
#6
execute immediate 'select count(*) into n_count from kk09@dkk_'||v_yab139||'where yac005=v_yac005'