I am trying to count individual id's in each major but can't see to get
the thing right.  Any help would be appreciated: (Oracle SQL)

<CFQUERY NAME="summary"  DATASOURCE="NGTbanner" >
        SELECT distinct 
        majr_code1 major,
        id, count(id) tstuds,
        last_name, 
        first_name, 
        styp_code stype,
        camp_code,
        total_credit_hours chrs, 
        ests_code rstatus,
        sysdate,
 
decode(camp_code,'1','Clarkesville','2','Blairsville','3','Currahee','9'
,'Internet')
camp 
   from  as_student_enrollment_summary 
   where term_code_key = '#term#' 
     and levl_code = '50' 
     and registered_ind = 'Y'
     and camp_code like '#campus#'
 Group by
 majr_code1,
        id,
        last_name, 
        first_name, 
        styp_code,
        camp_code,
        total_credit_hours, 
        ests_code,
        sysdate
   order by #sort#
</CFQUERY>

<!--- Calculate totals for each major ---->
<cfset numamount="0">
<cfset numend="#summary.recordcount#">
<cfloop from="1" to="#numend#" index="i">
  <cfset numamount=numamount+#summary.tstuds[i]#>
</cfloop>

Jim Watkins
VP Technology & Institutional Services
706 781-2305 - Blairsville
706 754-7850 - Clarkesville
[EMAIL PROTECTED]
http://www.northgatech.edu  

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184824
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to