コンテンツへスキップ
メニュー
この質問にフラグが付けられました
4409 ビュー

I want to call a pgsql function In my select as follow :

select name from my_table where soundex(name) = 'foo'

So I include a tuple in before to do the select :


query += [('soundex(name)','=',soundex2(foo) ) ]

[...]

product_count = product_obj.search_count(cr, uid, query, context=context)

And I've got the following error :

Invalid field 'soundex(name)' in leaf "<osv.ExtendedLeaf: ('soundex(name)', '=', u'EKLP') on product_template (ctx: )>" 

So, I do I call the soundex function inside of the 'Where' clause ?


アバター
破棄
関連投稿 返信 ビュー 活動
0
9月 19
98
1
7月 17
3965
4
8月 16
8097
1
5月 16
4789
1
3月 16
4796