Happy new year (nearly) I would like to be able to pass the TOP n value into a SP, but can't get it to work.
you would think the following would work, but whatever data type I cast @xx as, it doesn't like it: DECLARE @xx int SET @xx = 150 SELECT TOP @xx field1 Etc.... anyone any ideas? (this is SQL Server 2000 / CF5) -- Regards; Richard Meredith-Hardy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com