I have to give a constraint which compare for a string pattern "product" in the description and reject the record..........
Is there any method to do it.
i have tried the compare function.its not workin.
I need to search the word product in the whole description any if it is present anywhere then reject the record.
Thanks,
Jayant
Comparision of String
Moderators: chulett, rschirm, roy
Hello there Jayant,
you can use the INDEX function in PX, the syntax is the same as that for a server job, INDEX(BigString,SearchString,Occurence) -> i.e. INDEX('This is a long string with Product numbers in it','Product',1) will return 28 and it will return a 0 when the SearchString does not occur in the BigString.
you can use the INDEX function in PX, the syntax is the same as that for a server job, INDEX(BigString,SearchString,Occurence) -> i.e. INDEX('This is a long string with Product numbers in it','Product',1) will return 28 and it will return a 0 when the SearchString does not occur in the BigString.
-
- Participant
- Posts: 147
- Joined: Sat Apr 30, 2005 1:23 am
- Location: Bangalore,India
Comparision of String
Jayant,
U can use INDEX function.
Syntax for Index function is Index (string, substring, instance).
This function will return the starting position of the sub string.
If substring is an empty string, 1 is returned. If substring is a null value, 0 is returned.
U can use INDEX function.
Syntax for Index function is Index (string, substring, instance).
This function will return the starting position of the sub string.
If substring is an empty string, 1 is returned. If substring is a null value, 0 is returned.
-
- Participant
- Posts: 42
- Joined: Tue Jan 18, 2005 5:48 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: