|Subject||Re: stored procedure issue|
> Because aggregate query with MIN() always return one and exactlyright, my bad. i just copied the original SELECT into if exists()
> one record, so your check for EXISTS is completely pointless.
statement and forgot to correct it.
> > How do i correct the procedure to calculate total points even ifJOIN
> >no detail records are found?
> SELECT SUM(HRM_GRADE.POINTS) FROM hrm_applicationsubject INNER
> HRM_GRADEYes now this works as expected. The only thing i am still wondering
> ON hrm_applicationsubject.gradeid = HRM_GRADE.ID
> WHERE hrm_applicationsubject.applicationid = :applicationid
> INTO :subjectpoints;
> IF(subjectpoints IS NULL) THEN
> subjectpoints = 0;
is, why when adding NULL to SOMETHING the result is NULL? Instead of
This logic seems abit weird....