0 - 2 of 2 tags for with clause

More precisely: I want to use a WITH clause in a stored procedure's "SELECT ... INTO :variable FROM..." statement.

   DECLARE violatedRowsCount INTEGER;
   SELECT COUNT(*) INTO :violatedRowsCount
      FROM ( <_here_> ) AS TBL;

Is it possible? If yes, how?


I've found an appendix at the end of TD 13.10's "Temporal Table Support" reference, which contains some SQL code about how can you validating temporal referential integrity shown below. It works great until I want to embed it to a trigger's ...WHEN ( EXISTS (<here>))... section.