+ Reply to Thread
Results 1 to 3 of 3

Thread: Make Query Table and Inner Joins

  1. #1
    Gaston Izaguirre
    Join Date
    Oct 2010
    Posts
    18
    Points
    1
    Answers Provided
    0


    0

    Default Make Query Table and Inner Joins

    Hi everybody,

    I will describe my problem in case someone has already solved or can help me to do it. I need to make an inner join between three non spatial tables through an OLE DB Connection, which are situated on a SQL Server. I found that the only way to perform an inner join in ARCGIS is through the "Make Query Table" tool. ¿Is this correct?
    Specifically my problem is that when performing the join (even between two tables) I get An invalid SQL statement WAS Used error. I tried SQL syntax variants but always get the same error.

    This is an example of a simple test I tried in the Query Builder of Make Query Table tool:

    "dbo.TABLE1.SOC_NUMERO = dbo.TABLE2.SOC_NUMERO AND dbo.TABLE1.SUMI_NUMER = dbo.TABLE2.SUMI_NUMER"

    When I verified the expression whithin the tool:

    "Verifying expression...
    There was an error with the expression.
    An invalid SQL statement was used. [dbo.TABLE2]"

    Any idea what could be the problem?

    Thank you in advance.

    Gaston.

  2. #2
    Jonathan Quinn

    Join Date
    Dec 2010
    Posts
    512
    Points
    366
    Answers Provided
    54


    2
    This post is marked as the answer

    Default Re: Make Query Table and Inner Joins

    There is a bug with the Make Query Table tool, (NIM048170), where a valid SQL query will produce an error that it is invalid. Run the tool and it will complete successfully.
    Last edited by j.quinn; 04-25-2012 at 07:49 AM.

  3. #3
    Gaston Izaguirre
    Join Date
    Oct 2010
    Posts
    18
    Points
    1
    Answers Provided
    0


    0

    Default Re: Make Query Table and Inner Joins

    Quote Originally Posted by j.quinn View Post
    There is a bug with the Make Query Table tool, (NIM048170), where a valid SQL query will produce an error that it is invalid. Run the tool and it will complete successfully.
    Jonathan, thank you very much for your reply. It was very useful because the SQL query I'm using is valid and working correctly despite the error message of the tool.

    Regards,
    Gaston.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts