Jump to content

Datatable.Select() query does not work with latitude and longitude fields.


Sumeeth Tewar

Recommended Posts

Hello,

I am trying to filter rows based on if data in the row is located in a particular latitude(real) and longitude (real) location.

The following is what is being used:

table=Document.Data.Tables['markers'];

rowSelection=table.Select('"Full Name" "'+variableValue+'" AND ' + ' latitude= '+ variableValue1+ ' AND longitude =' + variableValue2);

print('selected rows: ' + str(rowSelection.AsIndexSet()));

cursorQxMinValue = DataValueCursor.CreateFormatted(table.Columns["QxMin"]);

for childRow in tableRef.GetRows(rowSelection.AsIndexSet(),cursorQxMinValue):

print 'found rows: '

 

From the table the latitude and longitude exists in atleast 3rows, but the code doesnt fetch any.

Please note when i remove the latitude and longitude filters from above query, it works fine!

o/p is

selected rows: 0000

Can you please let me know whats wrong here

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...