update fk_resource 
set grade_path=(select a.grade_path from fk_resource a where a.id=fk_resource.father_id) || '/' || cast(id as varchar2(10)) 
where father_id<>-1这条sql语句报ORA-00933:SQL命令未正确结束
看不出来哪里错了,谁能帮个忙解决一下,非常感谢!

解决方案 »

  1.   


    update fk_resource 
    set grade_path=(
      select a.grade_path||'/'|| cast(id as varchar2(10)) from fk_resource a where a.id=fk_resource.father_id
     )  where father_id<>-1;
      

  2.   

    没看出问题啊,不过可以这样表达:
    update fk_resource 
    set grade_path=(select a.grade_path || '/' || cast(a.id as varchar2(10)) from fk_resource a where a.id=fk_resource.father_id) 
    where father_id<>-1