It works with data type of Varchar also (Even for your stage variables in this case). Cross check your input seq file and the job design once more.
See if you have passed 'input.file_name' and not 'input.file_type' to stage variable 1.
Use of index function
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
I chcked the job again.
In the substring position I tried by giving empty string like
index(input.filename,"",1) and it is returning 1 which is right,but thr indexfunction is not reading the ".".
I also tried by assigning integer value to the stage variables as suggested by ray,but getting the same value 0 as result.
In the substring position I tried by giving empty string like
index(input.filename,"",1) and it is returning 1 which is right,but thr indexfunction is not reading the ".".
I also tried by assigning integer value to the stage variables as suggested by ray,but getting the same value 0 as result.
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Put this in the occurance column: index('abcd.txt','.',1) and let know what you are getting in the output for that field
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>