Trouble with index function in a filter

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Benny Domeij
Participant
Posts: 6
Joined: Mon Mar 07, 2005 2:43 am

Trouble with index function in a filter

Post by Benny Domeij »

I have trouble with an index function in a filter. The where condition is:

INDEX('KM,CM,',produktomr:',',1) =1

I want only rows from the column produktomr that is equal to KM or CM.

I have seen a post in the forum that discusses solutions with locate and findstr, but I found those solutions hard to understand. If Index is not the best way please write 1-2-3 steps for me...
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The Index function you gave will work. What is your probelm with it?
Benny Domeij
Participant
Posts: 6
Joined: Mon Mar 07, 2005 2:43 am

Post by Benny Domeij »

I get this error message:

Filter_131: Parse error: Expected comparison, 'between', or 'like' operator, got: "["
Parse error: Expected boolean operator (and, or) got: "1".
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Ahh, that is correct. the INDEX function won't work as a filter condition. Instead of a FILTER stage, use a transform stage with the INDEX() function in the constraints.
Post Reply