Build an Aggregate off of results of custom SQL statement?

I've built a custom SQL statement and set the output to an entity I've created. I am trying to further query against that entity by setting the aggregate source to that query but it is always empty. It seems like it wants to read from the entity database but I haven't stored those records in the database. I want my aggregate to query against the resulting records from the initial custom SQL and not go to the database. I tried to send the output of this initial custom SQL to a list of structures but that structure list can't be used a a source for further aggregates.

In short, how do I perform this custom SQL query and the run aggregates against it?

Hopefully my question is clear.

Thanks.

Hi Bradford,

Though I think I understand what you mean to do, this is not possible. An Aggregate is translated by the Platform into an SQL statement, which is sent to the database. So if your data is not in the database, you can't reach it with an Aggregate.

Kilian Hekhuis wrote:

Hi Bradford,

Though I think I understand what you mean to do, this is not possible. An Aggregate is translated by the Platform into an SQL statement, which is sent to the database. So if your data is not in the database, you can't reach it with an Aggregate.

Thanks for your response.

Is my alternative approach of somehow getting this into a query-able list of structures feasible? Can you suggest another approach?

Thanks.


Hi Bradford,

I'll answer in your other question. Meanwhile, since I answered your question of this topic, I'd be must obliged if you could mark it Solved (even if it isn't the answer you were looking for :)).