Select mytable if empty (variable1) scan for field2 = variable2 Endscan Else scan for field1 = variable1 Endscan EndifI am asking this just for my knowledge, if yes I will also make changes in my all of codes accordingly.
select mytable > >scan for iif(empty(variable1), field2 = variable2, field1 = variable1) > * Code here >endscan >