谁能帮我解决这个问题:
CURSOR csr(start IN NUMBER, finish IN NUMBER, sort IN VARCHAR2, search IN VARCHAR2) IS
SELECT id, text, code, name
FROM (SELECT rownum r,
id,
text,
table1.code,
name
FROM table1, table2
WHERE table1.code = table2.code
AND (id LIKE ||'%'||search||'%'
OR name LIKE ||'%'||search||'%'
OR table1.code LIKE ||'%'||search||'%'
OR text LIKE ||'%'||search||'%')
)
WHERE r > start
AND r <= finish
ORDER BY sort;
这给了我以下行的 *ORA-00936 Missing Expression 错误:
AND( id LIKE ||'%'||search||'%'*
我只是在测试代码,但找不到问题所在。
任何帮助表示赞赏。