Use schedule in select('schedule')>
IF !USED('Schedule') USE Schedule IN 0 ELSE SELECT Schedule ENDIFThis code doesn't select the alias either - if not used, it will open it somewhere, but won't select it. Five lines.
IF !USED('Schedule') USE Schedule IN 0 ENDIF SELECT ScheduleWhich selects it, four lines. The one-liner we talked about replaces the first three lines - and does nothing (as USE... IN... never did that) to change current workarea.
select TableA use tableB in 0 use tableC in 0You wouldn't expect tableC to be selected after this, would you? Because you told it to open elsewhere.
USE Schedule IN select('Schedule') SELECT Schedule- two lines to do two things. Mind you, you don't necessarily want to select every table that you open - it may be sought() (seek()ed?) or related into or selected FROM or referenced in any other manner, depending on what you need it for. I, for one, wouldn't like the USE statement to always select the table it opens.