From: Peter Bailey Date: 2007-06-01T23:55:29+09:00 Subject: Re: Help with Ruby < - > Oracle Connectivity Brian Candler wrote: > On Fri, Jun 01, 2007 at 08:44:36PM +0900, Peter Bailey wrote: >> >> puts "Error code: #{e.err}" >> Error message: ORA-00923: FROM keyword not found where expected >> >> Program exited with code 0 >> >> which is exactly what the script said to do, to report the exact errors, >> number and all. > > Your login has been successful. Now you just need to learn Oracle SQL > :-) > > There's good documentation online at > http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/toc.htm > > As the error says, you are missing the FROM keyword. Try the following: > > SELECT 1+1 FROM DUAL > > as a very heavyweight desk calculator. Also, a quick Google suggests > that > > SELECT * FROM v$version > > will report the Oracle software component versions. > > Good luck, > > Brian. Success! Thanks, Brian! I got something. Here's what I put in there, at your suggestion. row = dbh.select_one("SELECT * FROM v$version") And here's what I got: Server version: Oracle Database 10g Release 10.2.0.2.0 - 64bit Production Program exited with code 0 I'm a bloody genius. What can I say? So, from what you've shown me, it appears that the SQL stuff is inside those parentheses, like above. Right? In SQLPlus, I have to end every instruction with a semi-colon, Perl-like. But, inside Ruby, that doesn't seem to be necessary. Thanks again, Brian -Peter -- Posted via http://www.ruby-forum.com/.