Login
Search   Moderators Wanted: If you're interested please send your portfolio to info[at]itechforums.com
Welcome to the iTechForums.
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
To register now click here.
Latest Threads
Advertisements
Forum Statistics
Threads:
Posts: 1
Members:
Number of Users Online:
Welcome to our newest member,
Reply
 
Thread Tools Display Modes
  #1  
Old 12-05-2009, 06:16 AM
Patrick R Patrick R is offline
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default

I need help with this ColdFusion Query Logic?


I need help with this ColdFusion Query Logic?

Can anyone tell me what is wrong with the WHERE statement in the cfquery statement?

cfparam name=form.Cohorts default=200808
cfquery name=RPGGradRates_Data datasource=RPG
SELECT Main_Cohort_Table.Banner, Main_Cohort_Table.GENDER, [Race Validation].RACE_Validation, Main_Cohort_Table.[LearningSupport/RegularEnrolled], Count(Main_Cohort_Table.PIDM) AS CountOfPIDM, Count(Main_Cohort_Table.Graduate4Yrs) AS [CountOfGraduate 4 Yrs], Count(Main_Cohort_Table.Graduate5Yrs) AS [CountOfGraduate 5 Yrs], Count(Main_Cohort_Table.Graduate6Yrs) AS [CountOfGraduate 6 Yrs], Count(Main_Cohort_Table.GraduateCurrentYr) AS [CountOfGraduate Current Yr]
FROM Main_Cohort_Table INNER JOIN [Race Validation] ON Main_Cohort_Table.RACE = [Race Validation].RACE
GROUP BY Main_Cohort_Table.Banner, Main_Cohort_Table.GENDER, [Race Validation].RACE_Validation, Main_Cohort_Table.[LearningSupport/RegularEnrolled], [Race Validation].Race_Sort, Main_Cohort_Table.[LearningSupport/RegularEnrolled]
WHERE Main_Cohort_Table.Banner IN (#form.Cohorts#)
ORDER BY Main_Cohort_Table.Banner, Main_Cohort_Table.GENDER DESC , [Race Validation].Race_Sort, Main_Cohort_Table.[LearningSupport/RegularEnrolled] DESC;
/cfquery

The rest of the code is below.

head
meta http-equiv=Content-Type content=text/html; charset=utf-8 /
titleRPG_Data/title
/head

body

H1Retention, Progression, and Graduation (RPG) Rates/H1

cfform action=RPG_Data.cfm method=post name=RPG preservedata=yes target=self

!--List box (Select Fall Cohort)--
Fall IPEDS Cohorts (1999-08)
select name=Cohorts
option value=200808Fall 2008
option value=200708Fall 2007
option value=200608Fall 2006
option value=200508Fall 2005
option value=200408Fall 2004
option value=200308Fall 2003
option value=200208Fall 2002
option value=200108Fall 2001
option value=200008Fall 2000
option value=199908Fall 1999
/option
/select

!--Radio Buttons (Select RPG Rates)--
p
Select RPG Rates:br
input type=radio name=Rates value =Ret onSelect=document.enrl.submit()Retention Rates
input type=radio name=Rates value=ProgProgression Rates
input type=radio name=Rates value=GradGraduation Rates
/p





cfif IsDefined(form.Rates) is True
cfif form.Rates is Ret
!--List Box (Select Retention Rates Years)--
p
Select Retention Rates:
select name=Retention Rates
option value=Choose the Breakdown
option value=1st Year1st Year Retention Rates
option value=All YearsAll Retention Rates
/option
/select
/p/cfif
/cfif

cfif IsDefined(form.Rates) is True
cfif form.Rates is Prog
!--List Box (Select Progression Rates Years)--
p
Select Progression Rates:
select name=Progression Rates
option value=Choose the Breakdown
option value=1st Year1st Year Progression Rates
option value=All YearsAll Progression Rates
/option
/select
/p/cfif
/cfif

cfif IsDefined(form.Rates) is True
cfif form.Rates is Grad
!--List Box (Select Graduation Rates Years)--
p
Select Graduation Rates:
select name=Graduation Rates
option value=Choose the Breakdown
option value=Six YearSix Year Graduation Rates
option value=All YearsAll Graduation Rates
/option
/select
/p/cfif
/cfif

!--List Box (Select Gender)--
Display Cohorts by Gender:
select name=Gender
option value=MMale
option value=FFemale
option value=_Both
/option
/select






!--List Box (Select Race)--
Display Cohorts by Race:
select name=Race
option value=BBlack
option value=WWhite
option value=OOther
option value=UUnknown
option value=_All Races
/option
/select

!--Submit Button--
p
input type=Submit name=Submit value=Submit
/p

cfoutput query=RPGGradRates_Data
#qMain_Cohort_Table.Banner#br
/cfoutput

/cfform

/body
/html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apple updates Logic Pro, Logic Express (Macworld.com) Tech News Tech News 0 09-23-2009 06:19 AM
How do I solve a "Error Executing Database Query" issue in Coldfusion? Chuck B Cold Fusion 1 03-21-2009 02:56 AM
Using ColdFusion, how do I assign the result of an SQL query to a variable? G A Cold Fusion 0 01-17-2009 08:28 PM
Fundamentals of Programming with Algorithms and Logic? TLDrummer78 Software Design & Algorithms 1 12-29-2008 02:14 AM
SQL Query in coldfusion? sparky77275 Cold Fusion 1 05-06-2008 09:05 PM

Your Ad Here

All times are GMT. The time now is 03:32 AM.