postgres 过程在 »end« 附近出现语法错误
当我尝试运行我的 prorudere 时遇到问题。我有一个表,其中所有值都以文本格式存储,并尝试转换为 int 或时间戳
CREATE OR REPLACE PROCEDURE public.textnummerictest(
)
LANGUAGE 'sql'
AS $BODY$
create or replace procedure textnummerictest()
language plpgsql
as $$
begin
insert into sensorhistory_test(
datetime,
sensorid )
select from sensorhistory_temp (
cast(sensorid as integer),
datetime::timestamp )
end; $$
$BODY$;
ALTER PROCEDURE public.textnummerictest()
OWNER TO postgres;
总是在接近结束时出现错误 Syntaxerror。
任何帮助真的很感激
I am facing an issue when I try to run my procudere. I have a table where I have all values stored in text format and try to convert to int or timestamp
CREATE OR REPLACE PROCEDURE public.textnummerictest(
)
LANGUAGE 'sql'
AS $BODY$
create or replace procedure textnummerictest()
language plpgsql
as $
begin
insert into sensorhistory_test(
datetime,
sensorid )
select from sensorhistory_temp (
cast(sensorid as integer),
datetime::timestamp )
end; $
$BODY$;
ALTER PROCEDURE public.textnummerictest()
OWNER TO postgres;
Always getting the error Syntaxerror near end.
Any help really appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现错误......
必须有一个“;”结束之前...
I found the error....
there must be a ';' before end...