" /> [OCM/WCM] Sql in order_by section. - Genesys CTI User Forum

Author Topic: [OCM/WCM] Sql in order_by section.  (Read 1490 times)

Offline WilanPL

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
[OCM/WCM] Sql in order_by section.
« on: July 03, 2018, 11:38:22 AM »
Advertisement
Is it possible to use SQL expressions in the order_by section?
I am asking because I am looking for an idea to sort records by the values of the text field. This field contains such values: 30_60, 60_100, 100_150, 150+.
I will be grateful for any suggestions.

i use Genesys Administrator 8.1.309.02
« Last Edit: July 03, 2018, 11:45:24 AM by WilanPL »

Marked as best answer by admin on July 04, 2018, 10:22:23 PM

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: [OCM/WCM] Sql in order_by section.
« Reply #1 on: July 03, 2018, 01:28:57 PM »
I have used something like this:


[font=Arial][size=0pt][/size][/font][code]
order by
(select
case column_userdata_2
when 4 then 1
when 1 then 2
when 2 then 3
Else 4
End
)
[/code][font=Arial][size=0pt][/size][/font]