"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(docDate))))
> 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