update t set vcode = (select code from t1 where t.vcode=t1.fcode)
在access2000里面执行出现"操作必须使用一个可更新的查询"错误,
但执行update t set vcode = 1 时没有问题,顾已经排除了权限问题,现在
怀疑是access2000不支持,请各位给一个替换的sql:)

解决方案 »

  1.   

    (select code from t1 where t.vcode=t1.fcode)
    select的结果是一个记录么update t set vcode =t1.code
    from t,t1
    where t.vcode=t1.fcode
    这样行不
      

  2.   

    这个已经试过了,不好用.
    语法错误 (操作符丢失) 在查询表达式 t1.code from t中。
      

  3.   

    1,
    select code from t1 where t.vcode=t1.fcode
    你选择的是CODE,怎么后面又是FCODE?
    2
    你t1这个表里面是不是有几个CODE的值与表t的VCODE值一样呀
      

  4.   

    update t set vcode = (select code from t1 where t.vcode=t1.fcode)
    这句话本身没问题。先检查(select code from t1 where t.vcode=t1.fcode)看看是什么?
      

  5.   

    update a set code = (select vcode from b where a.code=b.vcode)(所影响的行数为 6 行)
      

  6.   

    这句话一定问题没有的,在ORACLE ,SQLSERVER2000上都好用的,只是在ACCESS2000
      

  7.   

    这句话一定问题没有的,在ORACLE ,SQLSERVER2000上都好用的,只是在ACCESS2000上不好用,所以我怀疑是数据库的原因.
      

  8.   

    可能是access中的语法限制吧
      

  9.   

    SQL2000呀
    但你要看清楚
    update a set code = (select vcode from b where a.code=b.vcode)update t set vcode = (select code from t1 where t.vcode=t1.fcode)
    我的语句里只出现两个字段名:CODE和VCODE
    但你的里面有三个字段名
    是不是你把字段名弄错了
    语句是没什么问题的,但有时会搞错一些小问题,后果还是蛮严重的!
    所以会出现不可理新的查询!
      

  10.   


    数据库为bw,其中有两表jb,bw1
    其中编号是双精度型 碑文是备注型UPDATE jb SET jb.碑文 = bw1.碑文
    WHERE jb.编号=bw1.编号 and jb.户主=bw1.户主;语句是这样的,保存也通过,运行时。要求输入[bw1.碑文=][ bw1.编号][bw1.户主]---------
    试试:
    UPDATE jb,bwl SET jb.碑文 = bw1.碑文
    WHERE jb.编号=bw1.编号 and jb.户主=bw1.户主;
      

  11.   

    update t,t1 set t.vcode=t1.code
    where t.vcode=t1.fcode
    ====================
    ok
    access测试通过
      

  12.   

    update t set t.vcode=t1.code from t ,t1 where t.vcode=t1.fcode
      

  13.   

    SQL2000呀
    但你要看清楚
    update a set code = (select vcode from b where a.code=b.vcode)
    ===============================================================
    你这个写的会问题,code已经和vcode相等了,就不用update了
    :)
    ==============================================================
    update t,t1 set t.vcode=t1.code
    where t.vcode=t1.fcode
    ====================
    ok
    access测试通过
    ,谢谢,还是这个好用,分归你了
      

  14.   

    lz去access版看看,这样的问题就很容易找到答案的