<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Make Query Table - ERROR 000152: Invalid input data in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397406#M1316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;SPAN&gt;Original User: &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:sstrand@ocwd.com" rel="nofollow noopener noreferrer" target="_blank"&gt;sstrand@ocwd.com&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Original Date: 2013-04-18T13:54:51-0600&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to use the Make Query Table to join two tables in a one to many situation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't want to link the entire script because it is huge. Here is the piece of code within the larger script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;sqltable = "sqltable_" + InfoRequestNum
inList = ["wellresult","westbays"]
wellsList = ["wellresult.STAID1_T","wellresult.STAID2_T","westbays.STAID4"]
arcpy.MakeQueryTable_management(inList, sqltable, "USE_KEY_FIELDS", wellsList, "", "")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Some info about the script:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Everything is taking place in a file geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;wellresult is a point featureclass&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;westbays is a table&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Each point has a STAID1_T but there are multiple STAID4 that relate to one STAID1_T&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The output should be sqltable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The error:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000152: Invalid input data&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 16:25:47 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-12T16:25:47Z</dc:date>
    <item>
      <title>Make Query Table - ERROR 000152: Invalid input data</title>
      <link>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397406#M1316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;&lt;SPAN&gt;Original User: &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:sstrand@ocwd.com" rel="nofollow noopener noreferrer" target="_blank"&gt;sstrand@ocwd.com&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Original Date: 2013-04-18T13:54:51-0600&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to use the Make Query Table to join two tables in a one to many situation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't want to link the entire script because it is huge. Here is the piece of code within the larger script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;sqltable = "sqltable_" + InfoRequestNum
inList = ["wellresult","westbays"]
wellsList = ["wellresult.STAID1_T","wellresult.STAID2_T","westbays.STAID4"]
arcpy.MakeQueryTable_management(inList, sqltable, "USE_KEY_FIELDS", wellsList, "", "")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Some info about the script:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Everything is taking place in a file geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;wellresult is a point featureclass&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;westbays is a table&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Each point has a STAID1_T but there are multiple STAID4 that relate to one STAID1_T&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The output should be sqltable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The error:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;ERROR 000152: Invalid input data&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:25:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397406#M1316</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T16:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Make Query Table - ERROR 000152: Invalid input data</title>
      <link>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397407#M1317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This may be a silly question, but did you set the env.workspace? Does the workspace actually have "wellresult" and "westbays" in it and are they tables in the FGDB?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry if this throws you off in the wrong direction, but that's the first thing I'd double-check.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;j&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; I am trying to use the Make Query Table to join two tables in a one to many situation.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I don't want to link the entire script because it is huge. Here is the piece of code within the larger script:&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;PRE class="lia-code-sample line-numbers language-none"&gt;sqltable = "sqltable_" + InfoRequestNum
inList = ["wellresult","westbays"]
wellsList = ["wellresult.STAID1_T","wellresult.STAID2_T","westbays.STAID4"]
arcpy.MakeQueryTable_management(inList, sqltable, "USE_KEY_FIELDS", wellsList, "", "")&lt;/PRE&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;STRONG&gt;Some info about the script:&lt;/STRONG&gt; &lt;BR /&gt;Everything is taking place in a file geodatabase.&amp;nbsp; &lt;BR /&gt;wellresult is a point featureclass&amp;nbsp; &lt;BR /&gt;westbays is a table&amp;nbsp; &lt;BR /&gt;Each point has a STAID1_T but there are multiple STAID4 that relate to one STAID1_T&amp;nbsp; &lt;BR /&gt;The output should be sqltable.&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt; &lt;STRONG&gt;The error:&lt;/STRONG&gt; &lt;BR /&gt; &lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;ERROR 000152: Invalid input data&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:10:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397407#M1317</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-11T18:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Make Query Table - ERROR 000152: Invalid input data</title>
      <link>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397408#M1318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: SStrand&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, the env.workspace is a file geodatabase that contains wellresult (which is a point feature class) and westbays (which is a table). If you are saying both need to be tables, I will try adding in a conversion to get the wellresult as a table only and see how it goes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also changed up the code a bit, as I've found that the brackets are for personal geodatabases only, and I need things in quotes instead. Going off that help, the code currently looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;sqltable = "sqltable_" + InfoRequestNum
inList = "westbays;wellresult"
wellsList = "wellresult.STAID1_T", "STAID1_T";"wellresult.STAID2_T", "STAID2_T";"westbays.STAID4", "STAID4"
arcpy.MakeQueryTable_management(inList, sqltable, "NO_KEY_FIELD", "STAID1_T", wellsList, "")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This may be a silly question, but did you set the env.workspace?&amp;nbsp; Does the workspace actually have "wellresult" and "westbays" in it and are they tables in the FGDB?&lt;BR /&gt;&lt;BR /&gt;Sorry if this throws you off in the wrong direction, but that's the first thing I'd double-check.&lt;BR /&gt;&lt;BR /&gt;j&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:10:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397408#M1318</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T18:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Make Query Table - ERROR 000152: Invalid input data</title>
      <link>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397409#M1319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unless I'm reading something wrong, the documentation at the below link says Query layers will only work with enterprise databases.&amp;nbsp; A file geodatabase is not a valid input workspace.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000174000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000174000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this does not cause problems to get this data into SDE.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 15:41:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397409#M1319</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-04-22T15:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Make Query Table - ERROR 000152: Invalid input data</title>
      <link>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397410#M1320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: SStrand&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You linked a different tool which, yes, only works with SDE. Make Query Table does work with file geodatabases though:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000006r000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000006r000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Unless I'm reading something wrong, the documentation at the below link says Query layers will only work with enterprise databases.&amp;nbsp; A file geodatabase is not a valid input workspace.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000174000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000174000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this does not cause problems to get this data into SDE.&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 15:46:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397410#M1320</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-04-22T15:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Make Query Table - ERROR 000152: Invalid input data</title>
      <link>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397411#M1321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry about that.&amp;nbsp; I copied your script call to MakeQueryTable_management in Google, but I did not pay enough attention that it found MakeQueryLayer_management instead.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would suggest simplifying your call to MakeQueryTable_management to get it working and then add your more complex calls one-by-one until you find out what the current problem is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would also suggest some sort of logging or print statements to see if your variables are getting populated as expected.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Apr 2013 16:09:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/make-query-table-error-000152-invalid-input-data/m-p/397411#M1321</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-04-22T16:09:07Z</dc:date>
    </item>
  </channel>
</rss>

