I know this is a commonly discussed topic but I have tried all of the answers in other posts to no avail so I have finally decided to post my situation.
In my script:
failures=$(sqlplus -s << EOF
${SQLIN}
set heading off;
WHENEVER OSERROR EXIT 9;
WHENEVER SQLERROR EXIT SQL.SQLCODE;
select failures from dba_jobs where what like dbms_refresh.refresh%;
EOF
)
dbms_refresh.refresh%
is what I need to capture in single quotes, however, I know just using single quotes by themselves is not enough. I do not fully understand how unix and oracle translate single quotes in a select command.
I have tried the following with no luck:
Can someone please give me an explanation on how unix and oracle are talking to eachother that determines how a single quote is read in a select query?
EDIT: below is my result if I use 'dbms_refresh.refresh%'
select failures from dba_jobs where what like "dbms_refresh.refresh%" check_mview_test.sh check_mview_test_v1.ksh check_mview_test_v1.sh get_pageid_test.sh ERROR at line 1: ORA-00904: "dbms_refresh.refresh%": invalid identifier