I have short postcodes in a column 'postcode'. By short I mean SW1, BN2, BN22 etc, just the first part.
I need to list them in this order for eg.
The sql I have worked out so far is:
ORDER BY length(postcode), postcode
which works for the same first 2 chars, like:
but the whole list is not in order with sw coming before bn etc. I know there must be a way... Does anyone have any ideas please, or pointers to a tutorial. I have searched the Mysql site but can't find a way, or can't get my head round the general instructions to make a way.
Any help much appreciated!