Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
4571 Weergaven

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 ?


Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
sep. 19
98
1
jul. 17
4221
4
aug. 16
8432
1
mei 16
5048
1
mrt. 16
5065