D
djc
Thanks for the info.
Chris Hoare said:Just as an aside you can do a conditional order by clause like this
order by Case When @SortBy1 = '1' Then ContactFirstForename
When @SortBy1 = '2' Then ContactSurname
When @SortBy1 = '3' Then ContactTelephoneSurname
End
Only thing you may need to do is make sure that the typing is consistant;
you cant mix numeric and character fields; but you can have as many
parameters as you like so you can do @SortBY1 = 4 then 'A' and add a sortby2
as neccessary