Hi All,
Consider a table customer as below
AccNo Name
--------------------------------
1-101-1111 Sam
2-101-1112 Tom
3-201-1113 Tim
4-202-1114 Jim
5-203-1012 Jack
--------------------------------
I want a select query to get Names of customer having "101" from 3rd to 5th position.
I can achieve the above requirement as below
customer cus;
;
while select cus
{
if(subStr(cus.AccNo,3,3) == "101")
{
// do something
}
}
But i need something as below so that i can reduce the iteration of records.
customer cus;
;
while select cus
where subStr(cus.AccNo,3,3) == "101"
{
// do something
}
Thanks in advance,
Sai
*This post is locked for comments
I have the same question (0)