<?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: NXQL Cast string column to integer in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/nxql-cast-string-column-to-integer/m-p/325091#M12092</link>
    <description>&lt;P&gt;You have to do a manual database-level conversion as well as change your Nuxeo model.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Feb 2017 11:57:35 GMT</pubDate>
    <dc:creator>Florent_Guillau</dc:creator>
    <dc:date>2017-02-24T11:57:35Z</dc:date>
    <item>
      <title>NXQL Cast string column to integer</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nxql-cast-string-column-to-integer/m-p/325088#M12089</link>
      <description>&lt;P&gt;Hi there!
I would like to know if there is a way to cast mine column which is string to integer in NXQL query. I want to do that because I want to either order by this column with desc attribute or choose the highest string (I didn't have any influence on what type of column it will be).&lt;/P&gt;
&lt;P&gt;So I would reeeallly like something like this to work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; :&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;SELECT * FROM Document ORDER BY CAST(myCustomType:myCustomProperty AS INTEGER) DESC&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I also tried something like this with nuxeo api&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;myurl?query=SELECT MAX(myCustomType:myCustomProperty) FROM Document&lt;/CODE&gt; but i got 0 entries&lt;/P&gt;
&lt;P&gt;P.S.
I tried to to this also in OpenCmis and Cmisql but somehow cmis doesn't see my custom property. It's null/empty even if in reality and in Nuxeo it isn't&lt;/P&gt;
&lt;P&gt;Regards,
Michal Wochnik&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2017 09:44:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nxql-cast-string-column-to-integer/m-p/325088#M12089</guid>
      <dc:creator>__3</dc:creator>
      <dc:date>2017-02-24T09:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: NXQL Cast string column to integer</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nxql-cast-string-column-to-integer/m-p/325089#M12090</link>
      <description>&lt;P&gt;This is not possible and would be horribly inefficient in terms of query performance for large volumes. You must design your data model according to the operations needed on the data, therefore make your column an numeric type.&lt;/P&gt;
&lt;P&gt;The fact that CMISQL does not see your column is a different issue, you should ask a separate question.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2017 11:35:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nxql-cast-string-column-to-integer/m-p/325089#M12090</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2017-02-24T11:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: NXQL Cast string column to integer</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nxql-cast-string-column-to-integer/m-p/325090#M12091</link>
      <description>&lt;P&gt;Well, i was afraid this will be answer but i had to ask&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2017 11:56:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nxql-cast-string-column-to-integer/m-p/325090#M12091</guid>
      <dc:creator>__3</dc:creator>
      <dc:date>2017-02-24T11:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: NXQL Cast string column to integer</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nxql-cast-string-column-to-integer/m-p/325091#M12092</link>
      <description>&lt;P&gt;You have to do a manual database-level conversion as well as change your Nuxeo model.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2017 11:57:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nxql-cast-string-column-to-integer/m-p/325091#M12092</guid>
      <dc:creator>Florent_Guillau</dc:creator>
      <dc:date>2017-02-24T11:57:35Z</dc:date>
    </item>
  </channel>
</rss>

