Create function sort OCI