I'm using MySQL for a database containing 1 table with 10 columns.
The point is to get a view of a few columns and use it in a web application
So, I need 2 columns from this table - Pad(varchar) and Sequence(integer), then I create 8 views like this:
CREATE VIEW vv1 AS SELECT pad, sequence as lift1 FROM management WHERE LEFT(activity_id, 9) = 'MOUN.SECB'; create view vv2 as SELECT sequence as lift2 from management where left(activity_id, 9) = 'MOUN.SECT';
And so forth until vv8 which represents Task8. I end up with 8 views - lift1, lift2, lift3, task4, task5, task6, task7, task8.
Then I simply SELECT * FROM vv1, vv2 ... vv8; - BUT I get a huge result of data which is pretty much a 'truth table', i.e. combination of all the numbers (sequence) I have in the column. Basically, I need the very first and the very last row of this 9-page result. I can't understand why I get this data instead of:
A1 1 1 1 1 1
A2 2 2 2 2 2
(sorry for the ugly representation of the wanted result)
Hope you guys understand what I mean and give some ideas.
Thanks in advance