Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I need to join one feature class and one table. This is a one to multiple join, therefore, my only option seems to be by creating a query table. My problem is that the fields I want to join do not seem to be matched properly when I run the query table tool. I've tried using the following expression in the query table expression field to indicate that these are the fields to be joined: 'FishingAreaGroundFishNafoUnit.Code' = 'FishArea_Code_homeports_TotalValue.Code' However instead of returning a table with just a few hundred records, I get one with 42,000 records which makes no sense at all.

I think I may be doing something wrong (perhaps the problem is with my query), but I'm not sure what. When I verify my query in the query builder window, I keep getting a message saying 'The expression was verified successfully but no records were returned' which does not make any sense as there should definitely be some matches.

I've also been using his thread (bottom post) to guide myself in creating the query table http://forums.esri.com/Thread.asp?c=93&f=1728&t=172344in

Thanks in advance for your help!

Léa

share|improve this question
    
I forgot to mention, I am using ArcGIS 10.... –  user2118 Mar 3 '11 at 12:50
2  
Could you post the query that you are trying to use? –  Zachary Mar 3 '11 at 14:35

2 Answers 2

OK, I found the answer to my own question after calling ESRI's tech support.

To make a query table, follow all the steps described in the last post of this thread http://forums.esri.com/Thread.asp?c=93&f=1728&t=172344in .

When you get to step 4, do as it says: In the Expression box, enter a join statement using a shared attribute that will be used to append the second table to the first table such as Stations.StationID = Temperature.StationID.

However, make sure you do not enclose your field names in brackets, quotation marks or any characters for that matter. If you verify your query syntax, you will get an error message. Don't worry about it and just run the Make Query Table tool.

And voilà!

share|improve this answer
1  
Interesting that you have to ignore an error to get an expected result. Quite some design, there. I was having trouble with query tables, as well. This will prove useful. +1 –  Nathanus Mar 4 '11 at 16:58
    
I could not get this tool to work using data in SDE (SQL Server) with or without the quotes. I had to move my data into a FGDB and then removing the quotes worked. –  Dowlers Nov 5 at 19:25

These links are specifically for 10
Deciding relationship class, join or relate

essentials for joining

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.