SQL SYNTAX SYSTEM ENTITIES
Question

I want to check if a timer is running. You can check this by the system entity Meta_Cyclic_Job (field: is_running_since). When I write this SQL

SELECT IS_RUNNING_SINCE
FROM ossys_Meta_Cyclic_Job AS MCJ
JOIN ossys_Cyclic_Job_Shared AS CJS
ON MCJ.ID  = CJS.META_CYCLIC_JOB_ID
WHERE MCJ.NAME = 'Analyse_SR_DDE';

 and test it, I get the error: invalid SQL, Ossys_ is reserved prefix in DetectRunaction. When I write it between {} then I get the error: ossys_Meta-Cyclic_Job is an unknown entity in DetectRunaction

mvp_badge
MVP

Hi Danny,

The OutSystems SQL tool prevents access to the physical tables of the metamodel. So prefixes like OSSYS, OSLOG and OSUSR cannot be used.

https://success.outsystems.com/Documentation/11/Developing_an_Application/Use_Data/Query_Data/SQL_Queries#Avoid_Data_Definition_Language

You could of course reference these entities from the System module and use them in an Aggregate instead.

Regards,

Nordin

Hi Danny,

Please check out this documentation about OutSystems Platform Timers. With this documentation, you will see metadata entities (like - Meta_Cyclic_Job, Cyclic_Job, & Cyclic_Job_Shared) available in the System module, which provide information about timers.

Thanks & Regards

mvp_badge
MVP

Hi Nitish,

This is not an answer to Danny’s question.

He obviously already knows these entities exist and what data they contain, otherwise he wouldn’t try to include them in a SQL statement.

Regards,

Nordin

Hi Nordin,

Yeah, I see it now. Sorry, my bad.

Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.