<?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 conversion of an integer to string in SQL query in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/conversion-of-an-integer-to-string-in-sql-query/m-p/313915#M10933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am joining a table to my SQL database, and trying to determine if two values are equal, but I am having a hard time with this comparison&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;database.testing.PARCELS.PID &amp;lt;&amp;gt; PARCELS_SpatialJoin1.PID&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first value is text, the second is an integer.&amp;nbsp; In the Select By Attributes dialog box, how do I make this work?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Sep 2012 13:55:46 GMT</pubDate>
    <dc:creator>MattFrancis</dc:creator>
    <dc:date>2012-09-25T13:55:46Z</dc:date>
    <item>
      <title>conversion of an integer to string in SQL query</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/conversion-of-an-integer-to-string-in-sql-query/m-p/313915#M10933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am joining a table to my SQL database, and trying to determine if two values are equal, but I am having a hard time with this comparison&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;database.testing.PARCELS.PID &amp;lt;&amp;gt; PARCELS_SpatialJoin1.PID&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first value is text, the second is an integer.&amp;nbsp; In the Select By Attributes dialog box, how do I make this work?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 13:55:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/conversion-of-an-integer-to-string-in-sql-query/m-p/313915#M10933</guid>
      <dc:creator>MattFrancis</dc:creator>
      <dc:date>2012-09-25T13:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: conversion of an integer to string in SQL query</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/conversion-of-an-integer-to-string-in-sql-query/m-p/313916#M10934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Create a new field as Text, field calculate that field as the integer field. Re run the select by attributes with the 2 text fields.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2012 21:57:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/conversion-of-an-integer-to-string-in-sql-query/m-p/313916#M10934</guid>
      <dc:creator>ShaunLam</dc:creator>
      <dc:date>2012-09-25T21:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: conversion of an integer to string in SQL query</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/conversion-of-an-integer-to-string-in-sql-query/m-p/313917#M10935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;These sites will probably help:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s500000033000000&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/aa226054%28SQL.80%29.aspx" rel="nofollow noopener noreferrer" target="_blank"&gt;http://msdn.microsoft.com/en-us/library/aa226054%28SQL.80%29.aspx&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So try (the parameter for varchar is the size of your text-field, maybe 50):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
database.testing.PARCELS.PID &amp;lt;&amp;gt; CAST(PARCELS_SpatialJoin1.PID AS varchar(50))
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:58:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/conversion-of-an-integer-to-string-in-sql-query/m-p/313917#M10935</guid>
      <dc:creator>FabianBlau</dc:creator>
      <dc:date>2021-12-11T14:58:22Z</dc:date>
    </item>
  </channel>
</rss>

