If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Using functions within an index

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-14-04, 08:48
fruchtm fruchtm is offline
Registered User
 
Join Date: Nov 2004
Posts: 2
Question Using functions within an index

I'm using AS/400 DB2 V2R5 (I think). Our AS/400 is old, but still beefy and fast. I'm not an expert on the AS/400 but have a lot of experience with SQL.

I want to create an index as follows:

create index <some index file name> on <some PF>
(policy, effdte, coverg, prmste, aslob, burlin,
int(substr(char(effdte),1,4)))

I get error: "Token ( was not valid. Valid tokens: ) ,. " because it doesn't seem to like the function within an index. Is there another way to accomplish this? I have a 100,000,000 record file and need a summarization that takes less than 6 hours to run.

Thanks,
Mark
Reply With Quote
  #2 (permalink)  
Old 12-14-04, 21:37
n_i n_i is online now
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I'm not sure about AS/400 but you could try creating a "computed" column and include it into the index.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On