从test创建表newtable作为选择ncorrFactor(x0,x2);
它起作用了
但当我尝试这样做时:
p varchar;
p := X || 0 || '';
create table newtable as select ncorrFactor(p,x2) from test;它给了我这个错误:
ERROR: pg_atoi: error in "x0": can't parse "x0"我需要修理什么?
发布于 2013-10-28 08:47:08
假设第一个片段是用NZPLSQL编写的存储过程,将p视为'X0‘,则需要动态构建查询,并在该查询上使用“立即执行”。
例:
declare
query varchar;
begin
query:='create table newtable as select ncorrFactor('|| 0 ||',x2) from test';
execute immediate query;
end;https://stackoverflow.com/questions/19602681
复制相似问题