I have an advanced query to delete all recrds from Emails table that have a creadion date greater than 7 days. The query seems correct but it appears an error, output structure must be set. In the case of a delete what should be the output structure?

DELETE FROM {EMAILS} WHERE {EMAILS}.[CDATE] >= DateTimeToDate(AddDays(CurrDate(), 7))


Hi OsCaR_,

You can define any data structure you want. It's a mandatory field of the Advanced SQL.



Just set any dummy output structure, and it will works...

Hi Oscar,

The output structure will be the same entity you wanted to delete.So in this case your output structure is email entity.



But so it can be really any structure the entity we are using, in this case the emails structure? 

Hi OsCaR_ ,

Yes, any structure you want, because it won't be used as an output, it's just a mandatory field of the aggregate.