Advertisement

03.25.2008 at 08:19AM PDT, ID: 23267303
[x]
Attachment Details

turn the coldfusion query into the stored procedure . URGENT

Asked by erikTsomik in ColdFusion Application Server, SQL Query Syntax, Cold Fusion Markup Language

I have a cooldfusion query that i want to turn into the stored procedure or view . How can I do that

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
<cfquery name="getReport" datasource="cfelsunrise" dbtype="ODBC">	
		Select e.employeeid, e.last_name as empLastName, e.first_name as empFirstName, e.middle_name as empMiddleName, 
				tr.TrainingID, tr.courseID, tr.StdTimeFrame, .et.completiondate,
				er.last_name as erLastName, er.first_name as erFirstName, er.middle_name as erMiddleName, er.EmployeeID as erEmployeeiD,
				ea.last_name as eaLastName, ea.first_name as eaFirstName, ea.middle_name as eaMiddleName, ea.EmployeeID as eaEmployeeiD,
				ea.middle_name as eaMiddleName, l.name, l.locationID, l.state, s.stateid, a.areaID, r.regionID, e.hireDate
			from employee e 
			join employeejobhistory h 			on h.employeeid = e.employeeid
			inner join jobassignment ja 		on (ja.sequence = h.sequence and ja.emplrcd = 0 and ja.enddate is NULL)
			inner join jobcode_list j 			on j.jobcode = h.jobcode
			inner join location l 				on l.locationid = ja.locationid
			Inner join States s					on l.state = s.StateCode 
			inner join JobTrainLink jtl			on (jtl.JobCode = h.JobCode and jtl.DeptID = h.DeptID and jtl.TrainingID is not NULL)
			inner Join TrainingReqmt tr			ON (tr.TrainingID = jtl.TrainingID and tr.courseID in(#crslist#))
			left outer Join TrainReqState trs	ON (trs.TrainReqID = tr.TrainReqID and trs.StateID = s.StateID)
			left outer join employeeTraining et on (e.employeeid = et.employeeid and et.courseID = tr.CourseID and et.Errflag is NULL) 
			left outer join area a 				on a.areaid = l.areaid
			left outer join employee ea 		on ea.employeeid = a.managerEmpID
			left outer join region r 			on r.regionid = a.regionid
			left outer join employee er 		on er.employeeid = r.managerEmpID
			where e.terminationdate is NULL
				and DATEDIFF(dy, #cutoffdate#, e.HireDate) >= 0
				and l.excludeflag != 'Y'
				<cfif selregionalVP gt 0>and r.ManagerEmpID = #selregionalVP#</cfif>
				<cfif selareaManager gt 0>and a.ManagerEmpID = #selareaManager#</cfif>
				<cfif community gt 0>and l.LocationID = #community#</cfif>
			order by er.last_name, er.first_name, ea.last_name, ea.first_name, l.name, l.locationID, 
					e.last_name, e.first_name, e.middle_name, e.employeeID, tr.courseID, et.completiondate
	</cfquery>
 
Loading Advertisement...
 
[+][-]03.25.2008 at 06:17PM PDT, ID: 21208008

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.26.2008 at 12:06AM PDT, ID: 21209368

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.26.2008 at 08:57AM PDT, ID: 21213023

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Application Server, SQL Query Syntax, Cold Fusion Markup Language
Sign Up Now!
Solution Provided By: danrosenthal
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.26.2008 at 09:04AM PDT, ID: 21213096

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.26.2008 at 11:14AM PDT, ID: 21214592

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.26.2008 at 11:20AM PDT, ID: 21214661

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628