Hi,
I am trying to sort a select statement in a stored proc by a parameter that
I am passing in as a parameter.
When I put the following :
order by @sortOrder - I get the error:
1008 The SELECT item identified by the ORDER BY number %d contains a
variable as part of the expression identifying a column position. Variables
are only allowed when ordering by an expression referencing a column name.
Any ideas?? (apart from using exec - which I want to avoid for performance
reasons...)
cheers
Daniel Lancelot
Web Developer
Netstep Corporate Communications
Tel +44 (0) 1422 200308
Fax +44 (0) 1422 200306
e-mail: [EMAIL PROTECTED]
www: http://www.netstep.co.uk
<NOTE: The information contained in this e-mail is intended for the named
recipient(s) only. It may also be privileged and confidential. If you are
not an intended recipient, you must not copy, distribute or take any action
in reliance upon it. No warranties or assurances are made in relation to
the safety and content of this e-mail and any attachments. No liability is
accepted for any consequences arising from it.>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists