MySQL Forums
Forum List  »  General

my query is creating issue in prd
Posted by: prachi Chaurasia
Date: July 08, 2022 02:31AM

I TRied to make a custom report but when i try to import and run in prd
can u suggest whats wrong coz my query is working as preview

SELECT DISTINCT s.STUD_ID AS USER_ID,
ROUND(SUM(e.TOTAL_HRS,2) as DECIMAL (15,0)) AS Total_Hours,
ROUND(SUM(e.CPE_HRS,2) as DECIMAL (15,0)) AS CPE_Hours,
s.lname,
s.fname ,
s.EMAIL_ADDR ,
o.ORG_ID ,
o.ORG_DESC ,
(select su.user_value from pa_stud_user su where col_num = 10 and s.stud_id = su.stud_id) as "Board Unit",
(select su.user_value from pa_stud_user su where col_num = 20 and s.stud_id = su.stud_id) as "Employing Entity"
FROM pa_student s,
PA_CPNT_EVTHST e ,
PA_ORG o
WHERE e.STUD_ID = s.STUD_ID
AND s.ORG_ID = o.ORG_ID
AND o.ORG_ID (+) = s.ORG_ID
GROUP BY s.STUD_ID ,s.lname,s.fname ,s.EMAIL_ADDR ,o.ORG_ID ,o.ORG_DESC
UNION ALL
SELECT DISTINCT s.STUD_ID AS USER_ID,
ROUND (SUM(e.TOTAL_HRS,2) as DECIMAL (15,0)) AS Total_Hours,
ROUND (SUM(e.CPE_HRS,2) as DECIMAL (15,0)) AS CPE_Hours,
s.lname,
s.fname,
s.EMAIL_ADDR,
o.ORG_ID,
o.ORG_DESC,
(select su.user_value from pa_stud_user su where col_num = 10 and s.stud_id = su.stud_id) as "Board Unit",
(select su.user_value from pa_stud_user su where col_num = 20 and s.stud_id = su.stud_id) as "Employing Entity"
FROM pa_student s,
PA_XCPNT_EVTHST e,
PA_ORG o
WHERE e.STUD_ID = s.STUD_ID
AND s.ORG_ID = o.ORG_ID
AND o.ORG_ID (+) = s.ORG_ID
GROUP BY s.STUD_ID ,s.lname,s.fname ,s.EMAIL_ADDR , o.ORG_ID ,o.ORG_DESC
/** and s.stud_id in [UserSearch]
and [security:pa_student s] */

Options: ReplyQuote


Subject
Written By
Posted
my query is creating issue in prd
July 08, 2022 02:31AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.