>select max(cod) from mytable ;
> into array lctemp
> lctemp[1] = lctemp[1] + 1
> appe from array lctemp fields cod
>
>If the table already contain data it works fine
>However it the table is empty, an operand/operator mismatch error appears
>
>Moises
dimension lctemp[1]
select max(cod) from mytable ;
into array lctemp
lctemp[1] = IIF(_tally=0,1,lctemp[1] + 1)
appe from array lctemp fields cod
If you use this in a shared table you won't go far.