I have a query that has a dynamic order by clause:
SELECT calendar.Eventname, calendar.Calendar_ID, calendar.CalendarDate, calendar.StartTime, calendar.EndTime, calendar.STAMPM, calendar.ETAMPM, calendar.Location, calendar.Recurring, calendar.RID, Schools.School_name FROM calendar INNER JOIN Schools ON calendar.Location = Schools.School_ID WHERE calendardate >= @CalendarDate ORDER BY OrderBy OrderBy is fed from the search results form by clicking on a column header to sort. How do I write the query in the SP to accept this variable? Thanks, Bruce ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:2945 Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6
