--001485f7cc8e2477b5048459f308 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 16 April 2010 12:57, Mitja ebokli <mitja.cebokli / svashta.com> wrote: > On the other hand, not using :col_sep is giving me an error: > can't convert String into Integer (TypeError) > > Maybe the formatting of the line is wrong? > > Well if :col_sep works for you then use it. Perhaps this is a gem version issue. It didn't like it for me. One more question on this matter. > How do I extract/use the table columns from the select file or if used > as "select *" to extract all the column names, and than use them as a > CSV header. > > Sorry I have no knowledge of the Oracle db driver so I can't help you with that. I have a problem, as it seems, with columns where data are numbers. > For example, row with ID number is returning me something like 0.2001E4 > How is the data being returned from the database? If Oracle is returning the data in this format 0.2001E4 (as a string) then ruby will just copy it as is. I suspect that Oracle is returning the float as a string because ruby would display 0.2001E4 as 2001.0 if it was actually given as a number. You might need to convert the data to get the values displayed in a sensible way. a = "0.2001E4" => "0.2001E4" a.to_f => 2001.0 a.to_f.to_s => "2001.0" --001485f7cc8e2477b5048459f308--