You'll need to cast and then collate all the values.

In PostgreSQL, that'll look something like this (though switch array_agg for 
array_accum if using PG pre-8.4):
    array_to_string(array_agg(CAST(subsection1_percentile*100 AS int)), ',')

In MySQL:
    GROUP_CONCAT(CAST(subsection1_percentile*100 AS UNSIGNED) SEPARATOR ',')

-- 
Pat

On 03/01/2012, at 5:06 PM, mohitnegi wrote:

> In index i am using sql to convert my float field into integer by
> 
> has "(select subsection1_percentile*100 from scores)",     :as => 
> :subsection1_percentile, :type=>:multi
> 
> but it's throwing error subquery return more than one row.
> 
> If i am specifying it to be of type multi then why this error?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/thinking-sphinx/-/k7ML-crNqA0J.
> 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/thinking-sphinx?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" 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/thinking-sphinx?hl=en.

Reply via email to