Dileep Nunna
Dileep Nunna

Reputation: 109

getting error no implicit conversion of sequel

how to do below query in ruby sequel

table1.column1 = concat('a' + table2.column2 + 'b')

without 'a'

sequel.qualify(:table1, :column1) = concat(sequel.qualify(:table2, :column2) + 'b')

wokring properly.when adding 'a' also getting

TypeError: no implicit conversion of Sequel::SQL::StringExpression into String /root/test/test.rb:13:in `+'

Upvotes: 0

Views: 121

Answers (1)

Jeremy Evans
Jeremy Evans

Reputation: 12139

{:table1__column1 => Sequel.join(['a', :table2__column2, 'b'])}

Upvotes: 1

Related Questions