SQL problem |
||
![]() ![]() Gamma LtKer MDalby I have a database with the columns `id` and `data` the `id` column contains different numbers with values between 1 and 999 . e.g. SELECT * FROM database would return ----------- |ID ||Data| ----------- |2 ||dret| |4 ||asdf| |7 ||asdd| ----------- What i want to do fill in the gaps in `data` so that the column has all the numbers from 1 to 999 WITHOUT going over the ones that are (I need to keep the data intact) Desired Result.. SELECT * FROM database ----------- |ID ||Data| ----------- |2 ||dret| |3 || | |4 ||asdf| |5 || | |6 || | |7 ||asdd| |8 || | |8 || | |10 || | ----------- etc... Does anyone have a simple way to do this, I've been up since the early hours and my brain has switched off :-( Replies:
|
||
| CyberArmy::Forum v0.6 Generated In 0.02364 seconds |