were clause in filter
Moderators: chulett, rschirm, roy
were clause in filter
I am having a string eg. MAN,LANGUAGE I have to pick only that string which is before comma eg. MAN by using filter where clause.
If any one is having suggestions pls reply.
If any one is having suggestions pls reply.
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
Not really a filter but a string transformation, have a look at the FIELD command in the transform function list or one of the string commands in the Modify stage.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- Participant
- Posts: 103
- Joined: Wed Jul 06, 2005 12:29 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 103
- Joined: Wed Jul 06, 2005 12:29 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
I don't think this can be done with the Modify stage. The Modify stage is aimed towards type conversions and has very little in the way of string manipulation. The only string to string conversion functions I know are substring and string_trim.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- Participant
- Posts: 103
- Joined: Wed Jul 06, 2005 12:29 am
Hi Ray,
This is how i did it i have taken an input column by named name which contains data in the format MAN,LANGUAGE.Now i have used the modify stage with the following string function in this manner ouputname:string=field(name,",",1) where outputname is the name of the output column.But this is giving an error,so could please how tell me how i could resolve the problem.
Cheers,
Rajeev.
This is how i did it i have taken an input column by named name which contains data in the format MAN,LANGUAGE.Now i have used the modify stage with the following string function in this manner ouputname:string=field(name,",",1) where outputname is the name of the output column.But this is giving an error,so could please how tell me how i could resolve the problem.
Cheers,
Rajeev.
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
The Modify stage uses a different set of functions to the Transformer stage. FIELD is available in a transformer but it is not available in a Modify stage. As I said in my previous post there are very few string manipulation functions in a Modify stage unless you are converting to or from string type. Stick with a Transformer.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
-
- Participant
- Posts: 103
- Joined: Wed Jul 06, 2005 12:29 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Nowhere did I claim that the Field() function is available in the Modify stage; I simply asserted that the Modify stage is more efficient (because it generates an osh operator directly, without the need to generate a called function as the Transformer stage does).
String manipulation (other than data type conversion) is very limited in the Modify stage, as you will see in the table beginning on page 28-7 of the Parallel Job Developer's Guide or Chapter 13 of the Orchestrate 7.0 Operators Reference
I'm sorry about any confusion that this may have caused. I don't believe there is any way in the Modify stage to extract a delimited field from a string (or from a ustring).
String manipulation (other than data type conversion) is very limited in the Modify stage, as you will see in the table beginning on page 28-7 of the Parallel Job Developer's Guide or Chapter 13 of the Orchestrate 7.0 Operators Reference
I'm sorry about any confusion that this may have caused. I don't believe there is any way in the Modify stage to extract a delimited field from a string (or from a ustring).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.