Hopefully very simple SQL question – I’m just blacking out 🙂
I have a table of vendors (id, name, description, url). It used to be the web service returned them all sorted by id. After a while, I was asked to return sorted by name. Now they want me to allow them to change the order manually – to showcase new vendors.
Suppose I create another table, VendorOrder with (vendorid, placement), what can I put in the Order By section of the original query, to return the vendors sorted by placement?
As always, thanks in advance.
Guy
Make sure that you find exactly one vendorId in
vendorOrderfor eachidinvendor, otherwise use aleft joinbetween the tables.