0

In Rails console I can see the tables I have by issuing the command:

ActiveRecord::Base.connection.tables

I have an Oracle view table, and it is not in this list. In the console I can do a find on the view and get results. I was hoping something like:

ActiveRecord::Base.connection.views # No such thing

but that would be a nope. Any ideas?

rtfminc
  • 6,243
  • 7
  • 36
  • 45

1 Answers1

0

Lets open DB itself by running rails dbconsole (short-cut alias: "db"). Once you will get the db sessions, run the below query :

select view_name from all_views

Check this post Display all views on oracle database.

Community
  • 1
  • 1
Arup Rakshit
  • 116,827
  • 30
  • 260
  • 317
  • Yes, I can see the view using that. I am left scratching my head why I can run a query on a table and get results but on a view all I get is an SQLException: ORA-02019. – rtfminc Aug 05 '14 at 21:43