On 31/05/2010 3:09 PM, Stefan wrote:
Hi,

I have list of columns as an array, for example:

     columns = [ :level1, :level2, :level3]

I would like to select only those columns. How can I do that?

Following code does not seem to work as expected:

     result = dataset.select(columns)

this wraps column names in parenthesis:

     SELECT (level1, level2, level3) FROM ...

which results in SQL syntax error.

The columns need to be provided as separate parameters to select(), so:

   result = dataset.select(*columns)

will work in your case.

Cheers,
Gary.

--
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to