请问各位:我把Oracle9i和自己用vc写的程序放在同一台电脑上,执行select scott.emp.*,(select dname from scott.dept where scott.dept.deptno=scott.emp.deptno) from scott.emp
 就会报错“缺少右括号”,VC的程序放在只装客户端的电脑上运行就正常,那位大侠遇到这种情况的

解决方案 »

  1.   

    同一台电脑上,用ADO连接就会出问题,改用ODBC方式就没问题
      

  2.   


    select a.*,b.dname
    from scott.emp a,scott.dept b
    where a.deptno=b.deptno
      

  3.   

    直接执行的sql文?还是存储过程。缺少右括号,通常的意义就是说sql语句超长了,把多余的部分截掉了
      

  4.   

    换种写法试下:
    SELECT scott.emp.*, b.dname
      FROM scott.emp a, scott.dept b
     WHERE a.deptno = b.deptno