ORA - 933 [message #548051] |
Tue, 20 March 2012 00:33 |
|
new_oracle2011
Messages: 174 Registered: March 2011 Location: Qatar
|
Senior Member |
|
|
Following query is running fine when I run in the Toad, but when I paste this query to Oracle reports then it gives an error ORA - 933.
/* Formatted on 2012/03/20 08:23 (Formatter Plus v4.8.8) */
SELECT ROWNUM row_counter,
CASE
WHEN rm.qabila_id NOT IN ('38', '141')
THEN rm.name1
|| ' '
|| rm.name2
|| ' '
|| rm.name3
|| ' '
|| rm.name4
|| ' '
|| rm.name5
|| ' '
|| cq.qabila_name
ELSE rm.name1
|| ' '
|| rm.name2
|| ' '
|| rm.name3
|| ' '
|| rm.name4
|| ' '
|| rm.name5
END person_name,
rm.qid_no id_no,
CASE
WHEN rm.mobile_no IS NOT NULL AND rm.tel_no IS NOT NULL
THEN rm.mobile_no || '/' || rm.tel_no
WHEN rm.mobile_no IS NULL AND rm.tel_no IS NOT NULL
THEN rm.tel_no
WHEN rm.mobile_no IS NOT NULL AND rm.tel_no IS NULL
THEN rm.mobile_no
ELSE NULL
END contact_no,
rm.list_priority request_order, rm.attended attendence
FROM jls_requests_master rm, cmn_qabilas cq
WHERE rm.jalsa_srl = :jalsa_no
AND rm.qabila_id = cq.qabila_id
AND rm.list_no LIKE get_all (:list_no)
&sub_where_clause1
UNION
SELECT ROWNUM row_counter,
CASE
WHEN rm.qabila_id NOT IN ('38', '141')
THEN rm.name1
|| ' '
|| rm.name2
|| ' '
|| rm.name3
|| ' '
|| rm.name4
|| ' '
|| rm.name5
|| ' '
|| cq.qabila_name
ELSE rm.name1
|| ' '
|| rm.name2
|| ' '
|| rm.name3
|| ' '
|| rm.name4
|| ' '
|| rm.name5
END person_name,
rm.qid_no id_no,
CASE
WHEN rm.mobile_no IS NOT NULL AND rm.tel_no IS NOT NULL
THEN rm.mobile_no || '/' || rm.tel_no
WHEN rm.mobile_no IS NULL AND rm.tel_no IS NOT NULL
THEN rm.tel_no
WHEN rm.mobile_no IS NOT NULL AND rm.tel_no IS NULL
THEN rm.mobile_no
ELSE NULL
END contact_no,
rm.list_priority request_order, rm.attended attendence
FROM jls_requests_archive rm, cmn_qabilas cq
WHERE rm.jalsa_srl = :jalsa_no
AND rm.qabila_id = cq.qabila_id
AND rm.list_no LIKE get_all (:list_no)
&sub_where_clause1
&order_clause
I dont know what to do now as this is the best i can do. It will be great if somebody helps me in solving this error.
Thanks in advance.
|
|
|
|
|
|