Subject | Re: [firebird-support] order by using parameter of stored procedure |
---|---|
Author | Helen Borrie |
Post date | 2012-03-19T03:06:38Z |
At 09:26 AM 19/03/2012, Newbie wrote:
./heLen
>How to best implement ORDER BY of a query when the field by which toIt is not possible to that directly, as ORDER BY is a structural element that is pre-compiled.
>order, is given as stored procedure input parameter?
>for example a typical product list where could be ordered by Name, PriceUse EXECUTE STATEMENT. Look up the Language Reference Update document for your version of Firebird to see how this is achieved. You should find it in the ../doc/ subdirectory of your installation; if not, you can download it from the Firebird website documentation area.
>etc fields depending on what user clicks.
>
>I tried to include it into query:
>
>for
>select f1, f2 from t1
>order by :order_by_field
>into :p1, :p2
>
>I am not getting any errors, but it doesn't order the list. how to do it
>better?
./heLen