AnsweredAssumed Answered

SQL question

Question asked by desertsp on Oct 22, 2016

I'm working with the Make Query Table tool to join two Personal Geodatabase feature classes and one table, in support of a "snap to closest feature with matching attributes" process. The table, produced by the Generate Near Table tool, indicates the distance between any pair of features from the two feature classes. Currently I'm able to handle the "with matching attributes" portion in the SQL, but I'm having to handle the "closest" part in subsequent steps. The two features classes are very large so there are likely to be millions of matches, which is why I'm interested in only outputting the closest one, in order to have reasonable processing time. 

 

Is it possible, in SQL, to combine everything in one step? So first it would be subsetting to "matching attributes" and then it would be subsetting to the one with the lowest distance. 

 

I can post an example if that would help. Thanks!

Outcomes