What do you have in mind saying "oldpath" and "newpath"?
Are the tables 'aFile' and 'bFile' opened as aliases aFile and bFile?
If you open table aFile by a command:
USE aFile ALIAS foo
and issue a select with
FROM 'aFile' clause - the select would use the alias foo instead of opening the table 'aFile' again under different alias.
So, after the select, you still have the table 'aFile' opened in foo workarea.
Remeber that the name of alias needn't be the the same as the corresponding table name (usually is): DBF('alias_name')<> alias_name.
Try
IF USED('aFile')
USE IN 'aFile'
ENDIF
>When I do a SQL select statement like
>
>SELECT value_a, value_b FROM (oldpath+'aFile'), (newPath+'bFile');
>INTO CURSOR ltmpOutPut
>
>THe aFile and bFile is default open, I tried to close them
>by using
>
>USE IN aFile
>USE IN bFile
>USE IN ltmpOutPut
>
>However, it does not work. It stated that
>'Alias aFile is not found'.
>Please advise me on this simple question. Thank you.
_________________
*|| Andrzej [NJ].