<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I&#8217;m using DBIX against a sqlite3 database on Redhat centos.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">I&#8217;m trying a simple select substr(cdd_document, 1,3) from a table called page<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">&nbsp; my $cdd = $db-&gt;resultset('Page')-&gt;search (<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {},<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select =&gt; [{&quot;substr(cdd_document,1,3)&quot; =&gt; 'cdd_document'}],<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; distinct =&gt; 1<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; );<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Which *<b>seems</b>* to be OK &#8230; but I get this result:<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">SELECT SUBSTR(ME.CDD_DOCUMENT,1,3)( cdd_document ) FROM page me GROUP BY cdd_document:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">at /usr/local/share/perl5/DBIx/Class/Schema.pm line 1081.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBIx::Class::Schema::throw_exception(Dsti::MVN::Index::Type_84::Schema=HASH(0x42354e8), DBIx::Class::Exception=HASH(0x521b798)) called at /usr/local/share/perl5/DBIx/Class/Storage.pm
 line 113<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBIx::Class::Storage::throw_exception(DBIx::Class::Storage::DBI::SQLite=HASH(0x42357d0), DBIx::Class::Exception=HASH(0x521b798)) called at /usr/local/share/perl5/DBIx/Class/Storage/BlockRunner.pm
 line 190<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBIx::Class::Storage::BlockRunner::__ANON__[/usr/local/share/perl5/DBIx/Class/Storage/BlockRunner.pm:219]() called at /usr/local/share/perl5/Context/Preserve.pm
 line 37<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Context::Preserve::preserve_context(CODE(0x52a17c0), &quot;replace&quot;, CODE(0x5281690)) called at /usr/local/share/perl5/DBIx/Class/Storage/BlockRunner.pm
 line 219<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBIx::Class::Storage::BlockRunner::_run(DBIx::Class::Storage::BlockRunner=HASH(0x5194740), CODE(0x3434ed0)) called at /usr/local/share/perl5/DBIx/Class/Storage/BlockRunner.pm
 line 111<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBIx::Class::Storage::BlockRunner::run(DBIx::Class::Storage::BlockRunner=HASH(0x5194740), CODE(0x3434ed0)) called at /usr/local/share/perl5/DBIx/Class/Storage/DBI.pm
 line 850<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBIx::Class::Storage::DBI::dbh_do(undef, undef, &quot;SELECT SUBSTR(ME.CDD_DOCUMENT,1,3)( cdd_document ) FROM page &quot;..., ARRAY(0x523e650), ARRAY(0x5266bf0))
 called at /usr/local/share/perl5/DBIx/Class/Storage/DBI.pm line 1815<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBIx::Class::Storage::DBI::_execute(DBIx::Class::Storage::DBI::SQLite=HASH(0x42357d0), &quot;select&quot;, ARRAY(0x52432b0), ARRAY(0x52afdc0), undef, HASH(0x523e620))
 called at /usr/local/share/perl5/DBIx/Class/Storage/DBI.pm line 2376<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBIx::Class::Storage::DBI::_select(DBIx::Class::Storage::DBI::SQLite=HASH(0x42357d0), ARRAY(0x52432b0), ARRAY(0x52afdc0), undef, HASH(0x5248458))
 called at /usr/local/share/perl5/DBIx/Class/Storage/DBI/Cursor.pm line 124<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBIx::Class::Storage::DBI::Cursor::next(DBIx::Class::Storage::DBI::Cursor=HASH(0x5225640)) called at /usr/local/share/perl5/DBIx/Class/ResultSet.pm
 line 1346<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBIx::Class::ResultSet::_construct_results(DBIx::Class::ResultSet=HASH(0x47b6508)) called at /usr/local/share/perl5/DBIx/Class/ResultSet.pm line
 1259<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DBIx::Class::ResultSet::next(DBIx::Class::ResultSet=HASH(0x47b6508)) called at t/Dsti-MVN-Index.t line 390<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB"># Looks like your test exited with 2 just after 34.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">Debugged program terminated.&nbsp; Use q to quit or R to restart,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp; use o inhibit_exit to avoid stopping after program termination,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">&nbsp; h q, h R or h o to get additional info.
<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">Am I missing something?<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:14.0pt;mso-fareast-language:EN-GB">Regards,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:14.0pt;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></b></p>
<p class="MsoNormal">Roger Day<o:p></o:p></p>
</div>
<font face="Calibri" size="1" color="black"><br>
Notice: This e-mail and any attachments are intended only for the individual or company to which it is addressed and may contain information which is privileged, confidential and prohibited from disclosure or unauthorised use under applicable law. If you are
 not the intended recipient of this e-mail, you are hereby notified that any use, dissemination or copying of this e-mail or the information contained in this e-mail is strictly prohibited by the sender. If you have received this transmission in error, please
 return the material received to the sender and delete all copies from your system.<br>
<br>
DST Output Limited is a company registered in England and Wales with company number 07262428.<br>
DST Output (Bristol) Limited is a company registered in England and Wales with company number 04220397.<br>
DST Output (Nottingham) Limited is a company registered in England and Wales with company number 04994924.<br>
<br>
The registered office for the above mentioned companies is: DST House, St Mark's Hill, Surbiton, Surrey, KT6 4QD.<br>
<br>
DST Output (London) Limited is a company registered in England and Wales with company number 02788181.<br>
DSI billing services Limited is a company registered in England and Wales with company number 03823171.<br>
<br>
The registered office for the above mentioned companies is: Evolution House, Choats Road, Dagenham, Essex, RM9 6BF.<br>
<br>
</font>
</body>
</html>