Hi Bing,
To work on a version with SQLExecute you'll first need to set the versioned view via a stored procedure in your DBMS, otherwise it will only see the base table.
The following topics explain how to access geodatabase data with SQL and versioned views (previously called multiversioned views)
SQL access to enterprise geodatabase data—ArcMap | Documentation
What is a versioned view?—ArcMap | Documentation
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.