09-10-2008 5:27 PM
HI All
I have a variable v1 = 'ztest'
and I have objid field values as 'ztest1', 'ztest2', 'ztest3', 'ztest'
I need to give a select command with a condition as follows
select count ( * ) into cnt from table where objid = v1.
It is giving the count value as 4 . But I want the exact match that is it has to consider only 'ztest' and not 'ztest1','ztest2' etc.
What should I do for this.
Regards
renuka.
09-10-2008 5:31 PM
Try this way
concatenate v1 '%' into v1.
condense v1 no-gaps.
select count ( * ) into cnt from table where objid like v1.
a®
09-10-2008 5:31 PM
Try this way
concatenate v1 '%' into v1.
condense v1 no-gaps.
select count ( * ) into cnt from table where objid like v1.
a®