>USE MyInternalTable >MESSAGEBOX(SET("Datasession")) >EXECSCRIPT([MESSAGEBOX(SET("Datasession"))]) >EXECSCRIPT("MESSAGEBOX(USED('MyInternalTable'))") >that all works like expected. The problem seems to be that the SQL SELECT does not see an alias that was established within the EXE and tried to access that outside of the EXE.