<?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 Re: Query Date on a FeatureClass joined with Table from SQL SERVER 2008 R2 in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124994#M7190</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to use the date functions and/or operators appropriate to your RDBMS to &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;implement date ranges, not copy my conceptual notation literally.&amp;nbsp; It might help to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;work on this in SQL, without ArcGIS involved at all.&amp;nbsp; Once you know how to build &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a valid query, integrating it with ArcGIS will be less difficult.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Dec 2010 11:00:53 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2010-12-29T11:00:53Z</dc:date>
    <item>
      <title>Query Date on a FeatureClass joined with Table from SQL SERVER 2008 R2</title>
      <link>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124990#M7186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ENVIRONMENT:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS DESKTOP 10 SP0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcSDE 10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SQL SERVER 2008 R2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;im going through something weird here..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a feature class joined with a table from SQL SERVER, the datasource shows properly no problem, but when i try to attribute query by date selecting the value from the unique list, i get a message "expression verified but it retuned no results" !!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Digging more into this, i viewed the bussiness table in sql server and noticed that its sotres the date with "00:00:00" so i tried to query with 'date 00:00:00' but i got a message "expression verified but it retuned no results" !!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;trying to work it out, i tried to query the datatable that is added the mxd when you do a join and this time it returned an error "Invalid Sql Statement" although i have built the expression using arcmap expression builder and selected the value from the unique list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i have attached a word 2003 document with all the screen shots with description hopping that someone can help with this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thank you&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2010 06:27:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124990#M7186</guid>
      <dc:creator>NoureddineEl-zaatari</dc:creator>
      <dc:date>2010-12-28T06:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Query Date on a FeatureClass joined with Table from SQL SERVER 2008 R2</title>
      <link>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124991#M7187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not everyone has Word on their computer, and even those that do might not be willing to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;open documents posted on the web (macro virus threat), and even if they are, there may &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;be compatibility issues. The best format for posting screenshots is JPEG; yes, it requires &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a bit more work to save a "bump" as .jpg, but if you're looking for assistance, it makes it &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;easier for the folks you want to read the documents to open them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Date types always have a certain level of imprecision to them -- especially when the database&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;leaves it to the client app to determine timezone.&amp;nbsp; Equivalence tests are unlikely to result&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in a TRUE evaluation unless they are exact to the second (or even millisecond).&amp;nbsp; The safe&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;way to do date comparisons is to construct a range test ( "datecol &amp;gt;= {date}00:00:00 AND&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;datecol &amp;lt; {date+1}00:00:00" ).&amp;nbsp; You can sometimes use the BETWEEN SQL operator (e.g.,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"WHERE expr BETWEEN v1 AND v2"), but on some implementations BETWEEN evaluates as&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"expr &amp;gt; v1 AND expr &amp;lt; v2", which would miss values equal to v1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2010 11:16:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124991#M7187</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2010-12-28T11:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Query Date on a FeatureClass joined with Table from SQL SERVER 2008 R2</title>
      <link>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124992#M7188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thank you vangelo for your response, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i tried the range comparison that you have supplied in your reply but it didnt work as well, i have attached screen shots as .JPG files as you have suggested&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;your support is highly appreciated,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thank you&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 02:06:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124992#M7188</guid>
      <dc:creator>NoureddineEl-zaatari</dc:creator>
      <dc:date>2010-12-29T02:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Query Date on a FeatureClass joined with Table from SQL SERVER 2008 R2</title>
      <link>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124993#M7189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;one last screenshot i couldnt attach due to upload size limit&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 02:08:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124993#M7189</guid>
      <dc:creator>NoureddineEl-zaatari</dc:creator>
      <dc:date>2010-12-29T02:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Query Date on a FeatureClass joined with Table from SQL SERVER 2008 R2</title>
      <link>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124994#M7190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You need to use the date functions and/or operators appropriate to your RDBMS to &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;implement date ranges, not copy my conceptual notation literally.&amp;nbsp; It might help to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;work on this in SQL, without ArcGIS involved at all.&amp;nbsp; Once you know how to build &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a valid query, integrating it with ArcGIS will be less difficult.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 11:00:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124994#M7190</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2010-12-29T11:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: Query Date on a FeatureClass joined with Table from SQL SERVER 2008 R2</title>
      <link>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124995#M7191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have had success in Query Builder on a Joined table using an unconventional syntax:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[your date field] &amp;gt; #2001-01-01#&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or, it also seems to work with&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[your date field] &amp;gt; #2001/01/01#&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems to work even though the dates are displayed in the attribute table as MM/DD/YYYY&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 17:46:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/query-date-on-a-featureclass-joined-with-table/m-p/124995#M7191</guid>
      <dc:creator>KelsiJurik</dc:creator>
      <dc:date>2011-11-29T17:46:53Z</dc:date>
    </item>
  </channel>
</rss>

