![]() |
Excel MS Query multiple select statements
Hi all,
I have a problem with MS Query in Excel. I have multiple select statements which MS Query can't interpret. I'm doing a query to Informix database, and if I have only one select statement, everything works ok, but if I try to retreive the data from 2 or 3 databases I have to use several select statements, and MS Query can't do that. I'm getting an error "Didn't expect ";" after the column list in the ORDER BY clause" SQL statement on the database server works fine. Can anyone help me with this ? Thanks ! -- Pozdrav Revenger 11.5.2006 15:14:23 Jednom su proizveli Chuck Norris toalet papir, ali papir nije dopustao da itko sere po njemu. |
Excel MS Query multiple select statements
If all queries return the same number of columns, join then with UNION ALL
SELECT a,b,c from d UNION ALL SELECT a,b,c from e UNION ALL SELECT a,b,c from f HTH -- AP "Revenger" a écrit dans le message de news: ... Hi all, I have a problem with MS Query in Excel. I have multiple select statements which MS Query can't interpret. I'm doing a query to Informix database, and if I have only one select statement, everything works ok, but if I try to retreive the data from 2 or 3 databases I have to use several select statements, and MS Query can't do that. I'm getting an error "Didn't expect ";" after the column list in the ORDER BY clause" SQL statement on the database server works fine. Can anyone help me with this ? Thanks ! -- Pozdrav Revenger 11.5.2006 15:14:23 Jednom su proizveli Chuck Norris toalet papir, ali papir nije dopustao da itko sere po njemu. |
Excel MS Query multiple select statements
On Thu, 11 May 2006 15:54:42 +0200, Ardus Petus wrote:
If all queries return the same number of columns, join then with UNION ALL SELECT a,b,c from d UNION ALL SELECT a,b,c from e UNION ALL SELECT a,b,c from f Thanks ! This helps alot ! -- Pozdrav Revenger 12.5.2006 12:23:18 Jednom su proizveli Chuck Norris toalet papir, ali papir nije dopustao da itko sere po njemu. |
Excel MS Query multiple select statements
Your last post was quite empy!!!
-- AP "Revenger" a écrit dans le message de news: ... On Thu, 11 May 2006 15:54:42 +0200, Ardus Petus wrote: If all queries return the same number of columns, join then with UNION ALL SELECT a,b,c from d UNION ALL SELECT a,b,c from e UNION ALL SELECT a,b,c from f Thanks ! This helps alot ! -- Pozdrav Revenger 12.5.2006 12:23:18 Jednom su proizveli Chuck Norris toalet papir, ali papir nije dopustao da itko sere po njemu. |
All times are GMT +1. The time now is 07:15 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com