<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: CaseQuery API with clob field</title><link>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field</link><description>&lt;p&gt;Hi Team,
I try to use CaseQuery API to lazy Case table - ORACLE,&lt;/p&gt;
&lt;p&gt;but stuck with description field (CLOB)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;query.orderBy().description().ascending();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;SQL generated: ORDER BY IWA_CASEQUERY.DESCRIPTION ASC&lt;/p&gt;
&lt;p&gt;but I got exception : ORA-00932: inconsistent datatypes: expected - got CLOB&lt;/p&gt;
&lt;p&gt;Seem it not allow to ORDER BY CLOB field&lt;/p&gt;
&lt;p&gt;Do we have any solution to fix it with CaseQuery API? like this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;query.orderBy().description().toString().ascending();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;[UPDATE] IVY version : 7.0.13&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field" rel="self"></atom:link><language>en</language><lastBuildDate>Sun, 22 Dec 2019 22:01:59 -0500</lastBuildDate><item><title>Comment by docvominh on Lukas Lieb's answer</title><link>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field#4302</link><description>&lt;p&gt;Cool, thank you very much :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">docvominh</dc:creator><pubDate>Sun, 22 Dec 2019 22:01:59 -0500</pubDate><guid>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field#4302</guid></item><item><title>Answer by Lukas Lieb</title><link>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field/4301</link><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sadly this seems to bee a problem with oracle databases. 
As I said ordering on a clob is not possible. But we can maybe fix this. I created an issue for this: XIVY-3506&lt;/p&gt;
&lt;p&gt;Kind regards&lt;/p&gt;
&lt;p&gt;Lukas&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lukas Lieb</dc:creator><pubDate>Fri, 20 Dec 2019 06:07:28 -0500</pubDate><guid>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field/4301</guid></item><item><title>Comment by docvominh on docvominh's answer</title><link>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field#4300</link><description>&lt;p&gt;for me is Oracle XE 11g (11.2.0.2.0)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">docvominh</dc:creator><pubDate>Fri, 20 Dec 2019 04:43:50 -0500</pubDate><guid>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field#4300</guid></item><item><title>Comment by Lukas Lieb on docvominh's answer</title><link>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field#4295</link><description>&lt;p&gt;Which version of oracle do you use?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lukas Lieb</dc:creator><pubDate>Fri, 20 Dec 2019 03:22:02 -0500</pubDate><guid>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field#4295</guid></item><item><title>Answer by docvominh</title><link>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field/4291</link><description>&lt;p&gt;Hi Lukas Lieb,&lt;/p&gt;
&lt;p&gt;We have Case table to display all case in the system, and Case has a description&lt;/p&gt;
&lt;p&gt;Now we want to sort with description, and IVY API allows to do it&lt;/p&gt;
&lt;p&gt;But SQL generated is got error&lt;/p&gt;
&lt;p&gt;It's easy to do a cast to char in SQL, but for now, I want to user CaseQuery API :(&lt;/p&gt;
&lt;p&gt;&lt;img alt="alt text" src="https://etvnyq.bn.files.1drv.com/y4mRgQLH-GMxk5ctxM7WhZLq91C9JB0qIEnZi793Z4Ykv4c-iy8X0pYRcGTr0fz9HKctNh2hvE0p_sfCkWErXFmK8Z6Ifa2-Rvq0NdHlNIJAE_bMwwplKoqdvvQRN8oa-5f2cd0ZOCcXa046F4fKPWu5F1yrxt1kmBpJ-vybSSsxxzMzPGWe8_uPipiSmgkux0ZTfnyTFs7XDB-380YcxYHJg?width=394&amp;amp;height=154&amp;amp;cropmode=none"&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">docvominh</dc:creator><pubDate>Thu, 19 Dec 2019 21:53:07 -0500</pubDate><guid>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field/4291</guid></item><item><title>Answer by Lukas Lieb</title><link>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field/4290</link><description>&lt;p&gt;First result on google: &lt;a href="https://stackoverflow.com/questions/12980038/ora-00932-inconsistent-datatypes-expected-got-clob"&gt;https://stackoverflow.com/questions/12980038/ora-00932-inconsistent-datatypes-expected-got-clob&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You cannot order on a clob. And if you have a look at the db you see that the description is a clob.&lt;/p&gt;
&lt;p&gt;What is the usecase to order a lazy case table by the description?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lukas Lieb</dc:creator><pubDate>Thu, 19 Dec 2019 04:05:58 -0500</pubDate><guid>https://answers.axonivy.com/questions/4287/casequery-api-with-clob-field/4290</guid></item></channel></rss>