"Marco Bresciani" <[EMAIL PROTECTED]> wrote: > Egor Egorov <[EMAIL PROTECTED]> ha scritto: > >>You can't do it only with MySQL. Retrieve table names from List table: >> SELECT CONCAT("FX", Name) FROM List; >> >>and then use programming language to construct a query. > > Thank you... I've supposed it... > What about using UNION? Something like: > > SELECT * FROM FX5686 UNION SELECT * FROM FX5698 UNION ... WHERE [condition] > > I obviously need a programming language to compose this query... but it > seems clearer to me... if it works!
You can use UNION, but WHERE condition should be written for each SELECT in the UNION: (SELECT * FROM FX5686 WHERE ..) UNION (SELECT * FROM FX5698 WHERE .. ) .. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]