Just a follow-up from this question:
What's the reason that UNLOAD from a proxy table is not supported?
184.108.40.20624 on Windows 32-bit returns SQLCODE -134 (SQLE_NOT_IMPLEMENTED - "Feature not supported") when trying to unload from a MS SQL Server proxy table.
I'm aware that unloading from a remote database will be far less efficient as unloading from a local database. However, OUTPUT from a proxy table does work, and in some cases UNLOAD is not preferable over OUTPUT because of its performance but simply because of its nature as a real SQL Statement (in contrast to an ISQL statement) that can be used within code blocks and procedures.
In the current case, I've found a workaround - but I would like to know whether there are particular reasons for the UNLOAD limitation.
The initial implementation of unload table (many, many, years ago) performed a low level table scan of that table and did not use any intermediate cursor. As a result, unloading a proxy table was impossible since the "low level table scan" would somehow need to be performed on the remote server. However, more recent versions of SQL Anywhere do use a cursor when performing UNLOAD...SELECT, and so it may be possible to at the very least to perform an UNLOAD...SELECT for proxy tables. I will therefore open an enhancement request to revisit the "no unload for proxy table" restriction and see if we can provide at least UNLOAD...SELECT support for proxy tables. In the meantime your workaround of selecting the contents of proxy tables into a temporary table and then unloading the temp table seems to be reasonable.
answered 24 May '11, 09:40