
May 23rd, 2000, 01:58 PM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,578
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
Stored Procedures [parameters]
<i><b>Originally posted by : Colin (Colin.densem@catalyst-solutions.com)</b></i><br />Nothing to urgent but...<br />Trying to convert sql statements from strings in the asp page to stored procedures within the db [access2000 at the moment.]. However I have one query which has about 20 possible order by options.<br />I am trying to make this (the order by fieldn) part a parameter and as yet found no way of doing it. If I have "order by [parm]" then its restricts the records to those with the value from the parm ie not the column name.<br /><br />If this is a bit wishy washy heres what I mean again<br />select * from file order by field1<br />or<br />select * from file order by field2<br />and so on.<br />I want to pass a parm for the field name. Is this possible? Or should I just stick this one in a passed string and forget about it?<br /><br />Cheers<br />Colin.<br /><br />
|