Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4166 Lượt xem

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 ?


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 9 19
98
1
thg 7 17
3633
4
thg 8 16
7406
1
thg 5 16
4401
1
thg 3 16
4398