Re: First day date of a month

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 24 Feb 2000 19:17:59 +0800
Message-ID: <38B51367.459B_at_yahoo.com>


K Stahl wrote:
>
> Connor McDonald wrote:
> >
> > K Stahl wrote:
> > >
> > > Sybrand Bakker wrote:
> > > >
> > > > select to_char(trunc(sysdate,'YYYY-MM'))
> > > > from dual;
> > > >
> > > > Sorry to correct an employee of Oracle.
> > > >
> > > > >
> > >
> > > That causes the error:
> > >
> > > ORA-01898: too many precision specifiers
> >
> > trunc(date,'MM')
> >
>
> There is no such thing as just 'date'. That must be a function that someone
> created on your system.

Sorry - I was just being "generic"...

select trunc(some_date_column,'MM')
from some_table;

OR

declare
  x date;
begin
  x := trunc(sysdate,'MM');
end;

etc etc etc

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk

We are born naked, wet and hungry...then things get worse
Received on Thu Feb 24 2000 - 12:17:59 CET

Original text of this message