我曾经能够使用 dbi likedb.do("select * from table")
并获得我需要的结果,但是我现在必须使用模式来访问我需要的表,并且上面的行会给我 dbi 错误:
DBI::ProgrammingError: ORA-00942: table or view does not exist
from stmt.c:312:in oci8lib.so
from C:/ruby/lib/ruby/gems/1.8/gems/ruby-oci8-2.0.6-x86-mingw32/lib/oci8/oci8.rb:288:in `exec'
from C:/ruby/lib/ruby/gems/1.8/gems/ruby-oci8-2.0.6-x86-mingw32/lib/dbd/OCI8.rb:354:in `execute'
from C:/ruby/lib/ruby/gems/1.8/gems/dbi-0.4.5/lib/dbi/base_classes/database.rb:96:in `execute'
from C:/ruby/lib/ruby/gems/1.8/gems/dbi-0.4.5/lib/dbi/base_classes/database.rb:114:in `do'
from C:/ruby/lib/ruby/gems/1.8/gems/dbi-0.4.5/lib/dbi/handles/database.rb:106:in `do'
from (irb):35
from ♥:0
我可以用这个访问表格,db.do("select * from schema.table")
但是我不想将每一行都从 更改table
为schema.table
。
请告诉我如何在不更改任何行的情况下让我的脚本工作?