SORT BY column# in stored procedure
Posted in 2003
Topics: Stored Procedures & SPL
I am trying to pass a column# as a parameter to a stored procedure, so it can sort the result by that column. However Stored procedure always take that number as a column name. Does someone know a walk around? Thanks,
Thomas wrote: > I am trying to pass a column# as a parameter to a stored procedure, so > it can sort the result by that column. However Stored procedure always > take that number as a column name. Does someone know a walk around? If you're using IDS 9.x, you can download and install the Dynamic SQL Bladelet from the IIUG. Otherwise, your stuck. What you're after is Dynamic SQL; what SPL does not support is Dynamic SQL. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/