dbTalk Databases Forums  

Re: create index on to_timestamp()

comp.database.oracle comp.database.oracle


Discuss Re: create index on to_timestamp() in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike Tayter
 
Posts: n/a

Default Re: create index on to_timestamp() - 04-02-2004 , 11:15 AM






in case anyone cares. this works:

create index idx_amgl_svcdte on am_gl(to_date(svcdte,'MM/YYYY'))

i'm guessing that to_timestamp() is not completely deterministic in
how it sets the milliseconds of what it returns. maybe a bug?

mike

mtayter (AT) umich (DOT) edu (Mike Tayter) wrote in message news:<386197a0.0403100725.d19dfb (AT) posting (DOT) google.com>...
Quote:
under oracle 9i, i tried to create this index:

create index idx_amgl_svcdte on am_gl(to_timestamp(svcdte,'MM/YYYY'))

but got this error:

ORA-01743: only pure functions can be indexed

am_gl.svcdte is char(7). from what i understand, a pure function is
one that is deterministic and has no side effects. is that correct?
why is to_timestamp not a pure function?

thanks

Mike

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.