<?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 Issue with SQL Expression valid/invalid in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/issue-with-sql-expression-valid-invalid/m-p/1103973#M561</link>
    <description>&lt;P&gt;I'm using ArcGIS Pro 2.8.&lt;/P&gt;&lt;P&gt;Using Modelbuilder, I am attempting to select by attribute. I validate the expression and it returns that it is valid. However, when I attempt to run the model it returns ERROR 000358: Invalid Expression. The input is from an ArcGIS Server connection. Not sure what I'm missing here. I've attached a screenshot.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Oct 2021 15:42:59 GMT</pubDate>
    <dc:creator>cartezj1</dc:creator>
    <dc:date>2021-10-01T15:42:59Z</dc:date>
    <item>
      <title>Issue with SQL Expression valid/invalid</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/issue-with-sql-expression-valid-invalid/m-p/1103973#M561</link>
      <description>&lt;P&gt;I'm using ArcGIS Pro 2.8.&lt;/P&gt;&lt;P&gt;Using Modelbuilder, I am attempting to select by attribute. I validate the expression and it returns that it is valid. However, when I attempt to run the model it returns ERROR 000358: Invalid Expression. The input is from an ArcGIS Server connection. Not sure what I'm missing here. I've attached a screenshot.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2021 15:42:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/issue-with-sql-expression-valid-invalid/m-p/1103973#M561</guid>
      <dc:creator>cartezj1</dc:creator>
      <dc:date>2021-10-01T15:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with SQL Expression valid/invalid</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/issue-with-sql-expression-valid-invalid/m-p/1103975#M562</link>
      <description>&lt;P&gt;The expression may be valid but not for that particular data source. Have you tried running the tool outside ModelBuilder?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2021 15:47:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/issue-with-sql-expression-valid-invalid/m-p/1103975#M562</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-10-01T15:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with SQL Expression valid/invalid</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/issue-with-sql-expression-valid-invalid/m-p/1103988#M563</link>
      <description>Outside of modelbuilder, I'm receiving "The SQL expression has invalid syntax" if I keep the same code that is in the screenshot. When building the expression I receive "There was an error with the expression." These errors are when using the ArcGIS server and the same feature class from the SDE. The SDE is PostgreSQL which I don't have access to.&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Oct 2021 16:13:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/issue-with-sql-expression-valid-invalid/m-p/1103988#M563</guid>
      <dc:creator>cartezj1</dc:creator>
      <dc:date>2021-10-01T16:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with SQL Expression valid/invalid</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/issue-with-sql-expression-valid-invalid/m-p/1104194#M564</link>
      <description>&lt;P&gt;This sounds like a problem with your expression, not with ModelBuilder. SQL can vary between different ArcGIS data sources and especially different SQL databases, the expressions that work with some databases are not supported with others. I think you need to look at some PostgreSQL documentation and check the syntax for this type of query.&lt;/P&gt;&lt;P&gt;The "date" keyword may not be needed here, see:&lt;BR /&gt;&lt;A href="https://sqlserverguides.com/postgresql-date-between-two-dates/" target="_blank"&gt;https://sqlserverguides.com/postgresql-date-between-two-dates/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;which uses:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;SELECT name,end_date as left_date FROM employee
WHERE end_date BETWEEN '1998-01-07' AND '2016-08-01';&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Oct 2021 17:54:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/issue-with-sql-expression-valid-invalid/m-p/1104194#M564</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-10-02T17:54:25Z</dc:date>
    </item>
  </channel>
</rss>

