Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: Substring P...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 15526 of 17437
Post > Topic >>

Re: Substring Problem

by ludwig@[EMAIL PROTECTED] May 13, 2008 at 03:56 PM

<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>
 




 2 Posts in Topic:
Re: Substring Problem
ludwig@[EMAIL PROTECTED]   2008-05-13 15:56:38 
Re: Substring Problem
stefan.schwarzer@[EMAIL P  2008-05-14 06:33:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 12:08:43 CST 2008.