Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alias in OData select statement

Tags:

odata

Do you know if there is any equivalent function to the SQL "as" statement in OData?

I need to do something like:

$select=field1 as revenue
like image 393
Felipe Plets Avatar asked Dec 18 '13 18:12

Felipe Plets


1 Answers

Update (February 2020)

This request has been completed. Within OData, expressions can be given an alias within the $compute query option or within aggregations.

Original

Something like this has been brought up to the OASIS committee (request: "allow expressions in the $select query option"), and the solution was to defer as a possible enhancement in future versions.

like image 177
mdl Avatar answered Oct 16 '22 04:10

mdl