is it possible to embed a <sql:query> tag inside a <sql:query>?

i am trying to use the result of one sql to look up data with another sql:

<sql:query var="waitList" sql="SELECT discipline, course_num, days_of_week, time_slot, crs_id, is_available, wait_list_course.semester FROM wait_list_course, time_slots WHERE time_slots.time_id=wait_list_course.time_id AND school_id=? ORDER BY discipline, course_num, time_slot, is_available">
<sql:param value="${sessionScope.school}" />
</sql:query>
<c:forEach var="listRec" items="${waitList.rows}">
<tr><td><c:out value="${listRec.discipline}" /> <c:out value="${listRec.course_num}" /></td><td><c:out value="${listRec.days_of_week}" /></td><td><c:out value="${listRec.time_slot}" /></td><td><c:out value="${listRec.is_available}" /></td><td><c:out value="${listRec.semester}" /></td>
<sql:query var="count" sql="SELECT count(*) FROM student_status WHERE add IS NOT NULL AND crs_id=?"> <sql:param value="${listRec.crs_id}" />
</sql:query> <td><c:forEach var="act_count" items="${count.rowsByIndex}"><c:out value="${act_count[0]}" /></c:forEach></td> <td><input type="button" name="close" value="Close" onClick="doAction('<c:out value="${listRec.crs_id}" />', 'close', 'No')"><input type="button" name="open" value="Open" onClick="doAction('<c:out value="${listRec.crs_id}" />', 'close', 'Yes')"><input type="button" name="recycle" value="Recycle" onClick="doAction('<c:out value="${listRec.crs_id}" />', 'recycle')"></tr>
</c:forEach>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to