mysql get X(point) along with join -


i trying run select query joining multiple tables. ont of tables has got column coordinate point type. works correctly in joins not allow me select x(coordinate) or x(point(coordinate)).

i can select coordinate in join , can select x(coordinate) directly on table both dont work.

select x(coordinate) location_coordinate 

the above 1 works

select ca.campus_id, ca.campus_name, ca.status_code, ca_loc.location_id, ca_loc.address, ca_coo.coordinate, ca_loc.locality_id, ca_loc.area_id, ca_loc.city_id, ca_loc.state_id, loc_locality.name locality_name, loc_area.name area_name, loc_city.name city_name, loc_state.name state_name     campus_account ca       left join location ca_loc          on ca_loc.location_id=ca.location_id      left join location_coordinate ca_coo         on ca_loc.location_id=ca_coo.location_id     left join location_master loc_locality         on(ca_loc.locality_id = loc_locality.location_master_id)     left join location_master loc_area         on(ca_loc.area_id = loc_area.location_master_id)     left join location_master loc_city         on(ca_loc.city_id = loc_city.location_master_id)     left join location_master loc_state         on(ca_loc.state_id = loc_state.location_master_id); 

this works. if try

select ca.campus_id, ca.campus_name, ca.status_code, ca_loc.location_id, ca_loc.address, ca_coo.x(coordinate), ca_loc.locality_id, ca_loc.area_id, ca_loc.city_id, ca_loc.state_id, loc_locality.name locality_name, loc_area.name area_name, loc_city.name city_name, loc_state.name state_name campus_account ca       left join location ca_loc          on ca_loc.location_id=ca.location_id      left join location_coordinate ca_coo         on ca_loc.location_id=ca_coo.location_id     left join location_master loc_locality         on(ca_loc.locality_id = loc_locality.location_master_id)     left join location_master loc_area         on(ca_loc.area_id = loc_area.location_master_id)     left join location_master loc_city         on(ca_loc.city_id = loc_city.location_master_id)     left join location_master loc_state         on(ca_loc.state_id = loc_state.location_master_id); 

it not select , gives me error saying x not column.

please help

it should x(ca_coo.coordinate) not ca_coo.x(coordinate).


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -