The val1 has to be the same length as ut_name and so on
Try
SEEK PADR(val1, LEN(ut_name)) + PADR(val2, LEN(ut_code))
>
>I have a table witb a regular index (composite) made up of two fields namely ut_name+ut_code. The index name is UT_UNAMCOD. The fields are both of type character
>
>I use the seek as follows to find the record:
>
>use mytable shared in 0 order UNAMCOD
>
>select mytable
>seek val1 + val2
>
>When I put valid values in val1 and val2 it does not find the record. If I seek on a index made up of single value the record is found but not on a composite one.
>
>I have tried to set exact and set near in both on and off state and it makes no difference. This has worked in the past but not now.
>
>Any suggestions on the problem.
>
>Thanks in advance.
--sb--