تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4528 أدوات العرض

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
سبتمبر 19
98
1
يوليو 17
4150
4
أغسطس 16
8368
1
مايو 16
4965
1
مارس 16
4990