Advertisement
Guest User

Untitled

a guest
Aug 30th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. require 'active_record'
  2.  
  3. conn1 = ActiveRecord::Base.establish_connection(
  4. :adapter => 'oracle_enhanced',
  5. :database => "//db1",
  6. :username => 'user1',
  7. :password => 'pwd1'
  8. )
  9. a = conn1.connection.exec_query("select N_WF_NIE from COMBINED")
  10. puts a
  11.  
  12. conn2 = ActiveRecord::Base.establish_connection(
  13. :adapter => 'oracle_enhanced',
  14. :database => "db2",
  15. :username => 'user2',
  16. :password => 'pwd2'
  17. )
  18. b = conn2.connection.exec_query("select MSLNN from PICAAMISC")
  19. puts b
  20.  
  21. c = conn1.connection.exec_query("select N_NIE from AGG")
  22. puts c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement