Is a Sort Column okay?
I just finished adding Section, Dimension, and SubSection columns to my database.
When I start joining the tables in various ways, I am not getting things in the order I want.
Would it be okay to add a column called "sort" and manually assign a "Sort Order #" so I have something on which to run my ORDER BY against?
For example, I want things in this order...
Also, if it is okay to do this for one table, would it be a major deal to do it on several tables, e.g. my Section, Dimension, and SubSection tables?
Sure. I do this all the time.
But take a hint from the olden days of when BASIC had line numbers and most people numbered their lines in increments of 10 ( 10, 20, 30, ... ).
Do that with your ordering column.
Now, if you change your mind about one number, you don't have to shuffle all the numbers around.
Say you had, indeed,
and you decided the 30 really should be before 20. So just change 30 to 15.
(Heck, I can remember numbering by 100 on occasion.)
|All times are GMT +1. The time now is 02:29 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.