<?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 Select features by attribute, IS NOT NULL in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/select-features-by-attribute-is-not-null/m-p/1308833#M68181</link>
    <description>&lt;P&gt;I need to copy features that are not Null. I need to use the arcpy.management.CopyFeatures because I am doing a join, that is one to many. The issue I am having is that my query to select "IS NOT NULL" doesn't work. I don't get an error, what is the correct syntax for this query?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Source = "Parcels"

Lyr = "Par"
fieldName = "TAXID"
select = """{0} IS NOT NULL""".format(fieldName)
arcpy.management.MakeFeatureLayer(TAXSource, Lyr)
arcpy.SelectLayerByAttribute_management(Lyr, "NEW_SELECTION", select)
arcpy.management.CopyFeatures(Lyr, "C:Temp/test.gdb/TestPar")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Lyr = "TaxPar"
#fieldName = "TAXID"
select = "TAXID IS NOT NULL" #"'TAXID = IS NOT NULL'"
arcpy.management.MakeFeatureLayer(TAXSource, Lyr, select)
arcpy.management.CopyFeatures(Lyr, "C:Temp/test.gdb/Testpar")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jul 2023 22:15:02 GMT</pubDate>
    <dc:creator>CCWeedcontrol</dc:creator>
    <dc:date>2023-07-17T22:15:02Z</dc:date>
    <item>
      <title>Select features by attribute, IS NOT NULL</title>
      <link>https://community.esri.com/t5/python-questions/select-features-by-attribute-is-not-null/m-p/1308833#M68181</link>
      <description>&lt;P&gt;I need to copy features that are not Null. I need to use the arcpy.management.CopyFeatures because I am doing a join, that is one to many. The issue I am having is that my query to select "IS NOT NULL" doesn't work. I don't get an error, what is the correct syntax for this query?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Source = "Parcels"

Lyr = "Par"
fieldName = "TAXID"
select = """{0} IS NOT NULL""".format(fieldName)
arcpy.management.MakeFeatureLayer(TAXSource, Lyr)
arcpy.SelectLayerByAttribute_management(Lyr, "NEW_SELECTION", select)
arcpy.management.CopyFeatures(Lyr, "C:Temp/test.gdb/TestPar")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Lyr = "TaxPar"
#fieldName = "TAXID"
select = "TAXID IS NOT NULL" #"'TAXID = IS NOT NULL'"
arcpy.management.MakeFeatureLayer(TAXSource, Lyr, select)
arcpy.management.CopyFeatures(Lyr, "C:Temp/test.gdb/Testpar")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 22:15:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-features-by-attribute-is-not-null/m-p/1308833#M68181</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2023-07-17T22:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Select features by attribute, IS NOT NULL</title>
      <link>https://community.esri.com/t5/python-questions/select-features-by-attribute-is-not-null/m-p/1310858#M68231</link>
      <description>&lt;P&gt;try:&lt;BR /&gt;select = ' "TAXID" IS NOT NULL '&lt;/P&gt;&lt;P&gt;Note: Your above code states two different Lyrs.&amp;nbsp; &amp;nbsp;Note the docs have caveats regarding existing queries on your layer that might affect results (&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/make-feature-layer.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/make-feature-layer.htm&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Tyler&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 01:27:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-features-by-attribute-is-not-null/m-p/1310858#M68231</guid>
      <dc:creator>TylerT</dc:creator>
      <dc:date>2023-07-24T01:27:21Z</dc:date>
    </item>
  </channel>
</rss>

