Kerry,
It gives me a solution and some reading.
No probs, here's some actual code that I hacked together on a
4.1-sommat-or-other database, an important thing to note is to be
careful of any Unique keys selected from the three individual tables as
they may no longer be unique of course once you've union them using the
ALL method.
CREATE TABLE Merged_names
(
`ID` int(11) unsigned NOT NULL auto_increment,
`Static_field` varchar(50) NOT NULL default '',
`Parent_table` varchar(255) NOT NULL default '',
`First_name` varchar(50) NOT NULL default '',
`Last_name` varchar(30) NOT NULL default '',
PRIMARY KEY (`ID`)
) ENGINE=MEMORY
SELECT Static_field, Parent_table, First_name, Last_name FROM
(
(
SELECT
ID, "Static Text" AS Static_field, "staff1" AS Parent_table,
First_name, Last_name
FROM
staff1
LIMIT 10, 5
)
UNION ALL
(
SELECT
ID, "Static Text" AS Static_field, "staff2" AS Parent_table,
First_name, Last_name
FROM
staff2
LIMIT 20, 5
)
UNION ALL
(
SELECT
ID, "Static Text" AS Static_field, "staff3" AS Parent_table,
First_name, Last_name
FROM
staff3
LIMIT 30, 5
)
) AS TMP;
Regards,
Phil
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]