Search notes:

ORA-62505: expression needs to be aliased

When using match_recognize, the elements in the measures clause need an alias.
create table tq84_tab (
   id     integer         primary key,
   txt    varchar2(10),
   num    number
);
The following (silly) statement throws *ORA-62505: expression needs to be aliased*;
select
   *
from
   tq84_tab match_recognize (
       order by
          id

       measures
          txt,
          num
          
       pattern (a)
          
       define
          a as length(txt) = num

);
This one runs ok:
select
   *
from
   tq84_tab match_recognize (
       order by
          id

       measures
          txt as txt,   -- <== Note the alias
          num as num
          
       pattern (a)
          
       define
          a as length(txt) = num

);

See also

Other Oracle error messages

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:51 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(51): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(66): id_of(Object(PDO), 'uri', '/notes/developm...') #2 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759479316, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #3 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/errors/ORA-62505_expression-needs-to-be-aliased(83): insert_webrequest() #4 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 51