Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4572 มุมมอง

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 ?


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ก.ย. 19
98
1
ก.ค. 17
4223
4
ส.ค. 16
8435
1
พ.ค. 16
5051
1
มี.ค. 16
5072