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

I have customer reference number like

FKM200,

ABD400,

DEF100,

ABD220,etc...

I want to sort the above reference number like :

DEF100,

FKM 200,

ABD220,

ABD400, ...

I have query = SELECT customer_id FROM res_partner order by CAST(SPLIT_PART(customer_id, '-', 2) AS INTEGER)"       

But my function is not working.

Please help me


 

アバター
破棄

can u post your total code

最善の回答

Hi,

If your pattern is fix like first three character is alphabates and another three character is numbers then you can achieve your objective using below query.

select ref from res_partner order by substr(ref,4,3)

It will return result as you have describe into your question.

I hope it will help you.

アバター
破棄