Hi

how to random to get one name from list by SQL 

there is any example in oml file 

Hi Farhan,

You can use the SQL rand() function and work with it. It will help you to retrieve a value that you can use in order to access to that position of the list.

For example, imagine that your list has 9 values. If you want to retrieve an integer value between 1 and 9, then you could use the following SQL command:

select floor ( rand () * 9 + 1 )


This command will return a random integer value. Then you can use the retrieved value and access to the position of the list (minus 1, because lists start in position 0 to N-1).


This will allow you to access to a random position of the list and get the name from the selected element.


Hope that this helps.


Kind regards,

Rui Barradas