0

how to convert this query to url i tried some thing like this

SELECT "column_name" FROM "table_name" [WHERE "condition"] ORDER BY "column_name" [ASC, DESC];

Sreekanth
  • 407
  • 4
  • 8
  • 20

2 Answers2

1

According to the protocol, you can use $crossjoin to query on multiple entity sets. but OData library does not support $crossjoin in uri parser, reader and writer.

Alternative, if the there are relationship (navigation property) between entity sets, you can try mix $select and $expand to get the results you want. For example:

baseurl/EntityA?$select=Property1,Property2&$expand=Navigation1($select=Property3)

Maya
  • 816
  • 6
  • 5
  • can you pls write for my query – Sreekanth Apr 10 '14 at 04:45
  • baseurl/DEPhysicians?$format=json&$select=FullName&$expand=DEPatientVisits($select=Diagnosis) tried like this.. but it showing "'DEPatientVisits($select=Diagnosis)' is not valid in a $select or $expand expression." – Sreekanth Apr 10 '14 at 07:02
  • @user3454176 very likely service does not support this... Which service do you use? WCFDS, WEB-API, or other? – Maya Apr 10 '14 at 07:23
  • WCF data services @Maya – Sreekanth Apr 10 '14 at 08:41
  • @user3454176 could you show me the response of "baseurl\$metadata" – Maya Apr 10 '14 at 08:53
  • {"odata.metadata":"http://localhost:33396/FalconCPDataService.svc/$metadata#DEPhysicians","value":[{"PhysicianID":"3894e78e-02f3-45d7-9852-c93dfd0701e2","LocaleID":null,"FullName":"Dr Thomson","LastModifiedDate":"2012-10-30T18:59:31.047","Address1":null,"Address2":null,"City":null,"State":null,"ZipCode":null,"Country":null,"Phone":null,"Specialty":null,"Notes":null}]} – Sreekanth Apr 10 '14 at 09:00
0

OData v4 introduces a new operators, which may resolve your scenario.

For more please reference this:http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html, section 5.1.1.5.1 any

Sreekanth
  • 407
  • 4
  • 8
  • 20