<span style="font-family: Verdana">Type casting is required since 8.3, try<br /><br />SELECT substring(date :: varchar from 1 for 7) AS stryearmonth, COUNT(id) AS countofnumber FROM (SELECT * from downloads ) AS foo GROUP BY stryearmonth ORDER BY stryearmonth ASC<br /><br />Bye...<br />Ludwig<span class="Apple-style-span" style="font-family: arial; font-size: 13px"><pre class="data" style="font-family: arial,tahoma,verdana,helvetica,sans-serif,serif; font-size: 100%"><br /><br /><font class="Apple-style-span" color="#666666" face="verdana" size="3"><span class="Apple-style-span" style="font-size: 11px; white-space: normal">Hi there,</span></font></pre> <pre class="data"><font class="Apple-style-span" color="#666666" face="verdana" size="3"><span class="Apple-style-span" style="font-size:
11px; white-space: normal">it seems to work with 8.1, but not anymore with 8.3. What is wrong with this substring request? Or is it some installation issue? Thanks for any suggestion!</span></font></pre> <pre class="data" style="font-family: arial,tahoma,verdana,helvetica,sans-serif,serif; font-size: 100%"><span class="Apple-style-span" style="color: #666666; font-family: verdana; font-size: 11px; white-space: normal">SELECT substring(date from 1 for 7) AS stryearmonth, COUNT(id) AS countofnumber FROM (SELECT * from downloads ) AS foo GROUP BY stryearmonth ORDER BY stryearmonth ASC</span></pre> <pre class="data" style="font-family: arial,tahoma,verdana,helvetica,sans-serif,serif; font-size: 100%"><font class="Apple-style-span" color="#666666" face="verdana" size="3"><span
class="Apple-style-span" style="font-size: 11px; white-space: normal">It says:</span></font></pre> <pre class="data" style="font-family: arial,tahoma,verdana,helvetica,sans-serif,serif; font-size: 100%"><font class="Apple-style-span" color="#666666" face="verdana" size="3"><span class="Apple-style-span" style="font-size: 11px; white-space: normal"><span class="Apple-style-span" style="color: #000000; font-family: arial; font-size: 13px"><pre class="data" style="font-family: arial,tahoma,verdana,helvetica,sans-serif,serif; font-size: 100%">ERROR: function pg_catalog.substring(date, integer, integer) does not exist LINE 1: SELECT substring(date from 1 for 7) as stryearmonth, COUNT(i...</pre></span></span></font></pre></span></span>