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 quot;Didn't expect quot;;quot; after the column list in the ORDER
BY clausequot;
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.
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
quot;Revengerquot; gt; a écrit dans le message de news:
...
gt; Hi all,
gt; I have a problem with MS Query in Excel.
gt; I have multiple select statements which MS Query can't interpret.
gt; I'm doing a query to Informix database, and if I have only one select
gt; statement, everything works ok, but if I try to retreive the data from 2
gt; or
gt; 3 databases I have to use several select statements, and MS Query can't do
gt; that.
gt; I'm getting an error quot;Didn't expect quot;;quot; after the column list in the ORDER
gt; BY clausequot;
gt; SQL statement on the database server works fine.
gt;
gt; Can anyone help me with this ?
gt;
gt; Thanks !
gt; --
gt; Pozdrav
gt; Revenger
gt; 11.5.2006 15:14:23
gt; Jednom su proizveli Chuck Norris toalet papir, ali papir nije dopustao da
gt; itko sere po njemu.
On Thu, 11 May 2006 15:54:42 0200, Ardus Petus wrote:
gt; If all queries return the same number of columns, join then with UNION ALL
gt;
gt; SELECT a,b,c from d
gt; UNION ALL
gt; SELECT a,b,c from e
gt; UNION ALL
gt; 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.
Your last post was quite empy!!!
--
AP
quot;Revengerquot; gt; a écrit dans le message de news:
...
gt; On Thu, 11 May 2006 15:54:42 0200, Ardus Petus wrote:
gt;
gt;gt; If all queries return the same number of columns, join then with UNION
gt;gt; ALL
gt;gt;
gt;gt; SELECT a,b,c from d
gt;gt; UNION ALL
gt;gt; SELECT a,b,c from e
gt;gt; UNION ALL
gt;gt; SELECT a,b,c from f
gt;
gt; Thanks ! This helps alot !
gt;
gt;
gt; --
gt; Pozdrav
gt; Revenger
gt; 12.5.2006 12:23:18
gt; Jednom su proizveli Chuck Norris toalet papir, ali papir nije dopustao da
gt; itko sere po njemu.
- Feb 22 Thu 2007 20:35
Excel MS Query multiple select statements
close
全站熱搜
留言列表
發表留言