帮我看看我的这个用游标修改数据的语句有问题吗?谢谢

siluhuayu 2004-04-30 05:00:00
string str
int count

declare cursor_money cursor for
select card_fee from card_code;
open cursor_money;
fetch cursor_money into :str;
DO WHILE SQLCA.sqlcode = 0
select count(*) into:count from card where status='否' and card_fee=:str;
update card_code set card_count=12 where current of cursor_money ;

FETCH cursor_money INTO :str;
loop
close cursor_money;

表里的Card_count是number类型的,数据库ORACLE
...全文
50 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
siluhuayu 2004-05-02
  • 打赏
  • 举报
回复
还是不对,我加LE COMMIT
popsn 2004-05-02
  • 打赏
  • 举报
回复
select count(*) into:count from card where status='否' and card_fee=:str;
-------
card 是另一个表来的吗?还有 card表中有字段card_free

where current of cursor_money ;不明呀,是不是ORACLE特有的语法结构呀。
xiao_bai 2004-04-30
  • 打赏
  • 举报
回复
结构没问题,update 后要commit; "where current of cursor_money"oracle不太熟,这里不清楚

743

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 脚本语言
社区管理员
  • 脚本语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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