This is a discussion on Stored procedure with dynamic order by clause within the MySQL Database forums, part of the Database Forums category; Group, I would like to create a procedure that will accept a parameter that will allow the stored procedures result ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Group,
I would like to create a procedure that will accept a parameter that will allow the stored procedures result set to be ordered based on parameters. Any help would be greatly appreciated. Create Procedure Proc_GetTodaysWorkload( inUserID Int, inSortCol Int ) Begin Select <Field Names> Joins <Tables Names> Where c.NameID = inUserID Order By inSortCol -- This doesn't work End; |