Skip site navigation (1) Skip section navigation (2)

Re: date_part stored procs

From: "Tsoloane Moahloli" <tsoloane(at)mimecast(dot)co(dot)za>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: date_part stored procs
Date: 2004-03-29 07:30:46
Message-ID: 000001c4155f$c299eb00$7b35a8c0@devel (view raw or flat)
Thread:
Lists: pgsql-sql
Perfect.  Thanks a lot....

-----Original Message-----
From: pgsql-sql-owner(at)postgresql(dot)org [mailto:pgsql-sql-owner(at)postgresql(dot)org]
On Behalf Of Tom Lane
Sent: 27 March 2004 01:03
To: tsoloane(at)mimecast(dot)co(dot)za
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] date_part stored procs 


"Tsoloane Moahloli" <tsoloane(at)mimecast(dot)co(dot)za> writes:
>   SELECT INTO len * FROM (SELECT
> ((date_part(''year'',age(docDate))*12)+(date_part(''month'',age(docDat
> e))))
> AS a;
 
> The problem is that it does not run and I cannot for the life of me tell
> why.    

I think you miscounted parentheses.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Disclaimer
The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of 
the individual or entity to whom it is addressed and others authorized to receive it. If you are not the intended recipient you are 
hereby notified that any disclosure, copying, distribution or taking action in reliance of the contents of this information is strictly 
prohibited and may be unlawful. Views and opinions are those of the sender unless clearly stated as being that of Mimecast (Pty) Ltd. 
Mimecast (Pty) Ltd is neither liable for the proper, complete transmission of the information contained in this communication, nor any 
delay in its receipt or that the mail is virus-free. Mimecast (Pty) Ltd is not liable whatsoever for loss or damage resulting from the opening 
of this message and/or attachments and/or the use of the information contained in this message and/or attachments.


In response to

pgsql-sql by date

Next:From: Bulatovic NatasaDate: 2004-03-29 07:33:13
Subject: Re: Invalid Unicode Character Sequence found
Previous:From: Greg StarkDate: 2004-03-28 06:31:31
Subject: Re: Slow sub-selects, max and count(*)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group