一段Query,放在pl/sql里运行是正常,放到vb.net里面就给我报如下错误:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in system.windows.forms.dllAdditional information: ORA-00923: FROM keyword not found where expected我的query是这样的:
select distinct innerbox.custspecinfo
  from innerbox, shiplotinnerboxlist sll, shiplot sl
 where (innerbox.innerboxid = sll.innerboxlistid)
   And (sll.shiplotid = sl.shiplotid)
   and sl.shiplotname = 'TR8210001'
请问哪位知道是什么问题吗?

解决方案 »

  1.   

    注意 from  前后留 空格
      

  2.   


    select distinct innerbox.custspecinfo 
    from innerbox
    left join shiplotinnerboxlist sll on innerbox.innerboxid = sll.innerboxlistid
    left join shiplot sl on sll.shiplotid = sl.shiplotid
    where sl.shiplotname = 'TR8210001' 
      

  3.   

    试一下上面的SQL.你可以在你的程序里设置断点,跟踪出SQL,然后再放在PL/SQL中执行一下看看.
      

  4.   

    在程序里设置断点,得到SQL,看sql是否正确