Mendix (OQL) datasets and the other reporting functionality cannot be used in microflows (or in data views/grids), so what you're describing is not possible.
You could create a Java action to execute the OQL query (using
Core.retrieveOQLDataTable(...)) and use the result to fill your entity. Another possibility might be rewriting your SQL query to XPath so you can achieve the same result by using a microflow retrieve action, but not every SQL query can be expressed using XPath.
Thanks for the support. I still have to find my way round in Mendix.
If the data is in another database use Webservices to publish it. Let Mendix consume.
Or define the SQL as view and use Database Replicator (AppStore) to get the data in Mendix. This is probably the best way around.
Only start writing Java if you are absolutely sure there is no alternative!
Use OQL Module available in Market place . Where an OQL query can populate an Entity in Mendix with less resource consumption too.