Excel MS Query multiple select statements

R

Revenger

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.
 
A

Ardus Petus

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
 
R

Revenger

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.
 
A

Ardus Petus

Your last post was quite empy!!!

--
AP

Revenger said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top