Thanks all who replied, it was very helpful!
----- Original Message ----- From: "Paul Hastings" <[EMAIL PROTECTED]> > I am using <cfstoredproc> so I won't be 'execing' anything. I need to know sure you can. though you might use sp_executeSQL as it will buy you some caching & is a bit more flexible. CREATE PROCEDURE junk @x int, @y varchar(100),@d datetime AS DECLARE @thisSQL nvarchar(500) SET @thisSQL = N'SELECT * From Urls where urlID >= @xparam AND datesubmitted > @dparam ORDER BY ' + @y exec sp_executeSQL @thisSQL, N'@xparam int, @dparam datetime', @x, @d > would you convert a query like this to a stored procedure, and then how > could you call it with <cfstoredproc>? see above... ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

