| Subject: | Re: Sorting and Stored Procedure |
|---|---|
| From: | "JR "Bob" Dobbs" <webforumsuser@xxxxxxxxxxxxxx> |
| Date: | Fri, 22 Jun 2007 20:07:08 +0000 (UTC) |
| Newsgroups: | macromedia.coldfusion.database_access |
See attached sample using query of queries to sort.
<!--- stored procedure will return resultset with 3 fields: FieldA, FieldB,
FieldC. Here we specify which to sort by --->
<cfset variables.sortBy="FieldA" />
<!--- get results for stored proc to variables.results --->
<cfstoredproc procedure="spGetData" dataSource="myDataSource">
<cfprocresult name="variables.results" />
</cfstoredproc>
<!--- use query or queries to sort --->
<cfquery name="variables.reportData" dbtype="query">
SELECT FieldA, FieldB, FieldC
FROM variables.results
ORDER BY #variables.sortBy#
</cfquery>
<cfoutput query="variables.reportData">
#FieldA#, #FieldB#, #FieldC#<br />
</cfoutput>
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Sorting and Stored Procedure, Adomacro |
|---|---|
| Next by Date: | Re: Sorting and Stored Procedure, paross1 |
| Previous by Thread: | Sorting and Stored Procedure, Adomacro |
| Next by Thread: | Re: Sorting and Stored Procedure, paross1 |
| Indexes: | [Date] [Thread] [Top] [All Lists] |