create procedure ??大家帮我

superjj2002 2002-11-22 04:55:16
create procedure test() returning char(4);

return 'test';

end procedure

document 'this is a test'

with listing in '/home/informix/script/log'

这个存储过程有什么错?我执行时,第一句就报错,[INTERSOLV][ODBC Informix driver][Informix]A syntax error has occurred.为什么啊,是我的版本不支持?(我也不知道我的版本是什么)

有什么好一点的可视化sql工具吗(informix)?
...全文
141 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wenlq 2002-11-26
  • 打赏
  • 举报
回复
这种形式调用存储过程,它就像informix的内部函数一样。

" from systables where tabid = 1 " 仅是为了输出一条记录。


把下面内容写入一个文件aa.sql
加上执行权限,就可以执行 ./aa.sql

dbaccess - - << EOF
database demodb;
create procedure test() returning char(4);
return "test";
end procedure

EOF

superjj2002 2002-11-26
  • 打赏
  • 举报
回复
请问斑竹,在命令行下如何执行创建存储过程的脚本?
select test() from systables where tabid = 1;
上面这句是什么意思啊?
wenlq 2002-11-25
  • 打赏
  • 举报
回复

execute procedure test() ;

select test() from systables where tabid = 1;

superjj2002 2002-11-25
  • 打赏
  • 举报
回复
谢谢楼上的 是这样的 现在可以建立存储过程 但是不能执行 报错如上述 为什么?有人用过吗 我的版本好像是7版本吧
prghome 2002-11-22
  • 打赏
  • 举报
回复
create procedure test()
returning char(4);

return "test";

end procedure;

你这样试试,好点的SQL工具我觉得是PB.

1,195

社区成员

发帖
与我相关
我的任务
社区描述
其他数据库开发 Informix
社区管理员
  • Informix社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧