SQL question - using LIKE

From: Pamela Miller <millerpd_at_maspo2.mas.yale.edu>
Date: 1995/06/02
Message-ID: <millerpd.19.0008BB5F_at_maspo2.mas.yale.edu>#1/1


I'm trying to write a query using several subqueries. When using IN or '=' before the subquery, I get results. When using LIKE, Oracle comes back with ORA-00936: missing expression. Is there a way to use LIKE with a subquery? Thanks.

Here is the SQL statement.

SELECT X.*
FROM schedules x, access y
WHERE USER IN

      (SELECT ID
       FROM authorization a, member b
       WHERE  b.id = USER
        AND a.groupname = b.groupname
        AND a.object = 'SCHEDULES'
        AND a.function = 'SELECT')
AND y.object = 'SCHEDULES'

AND y.function = 'SELECT'
AND x.fiscal_yr LIKE (SELECT value
  • - - the error message appears here FROM field_access WHERE field_name = 'FISCAL_YR' AND function = 'SELECT' AND object = 'SCHEDULES');
Received on Fri Jun 02 1995 - 00:00:00 CEST

Original text of this message