What kind of paramters are you trying to use wiht MSQuery?
Typcially I do all my data manipulation in SQL and then use Excel to show the data, I have found that this is easier and cleaner, just a thought.
Richard
Nick Hodge wrote:
[Quoted Text] > I'm trying to confirm this in the knowledge base, but it appears to be down. > I am pretty sure you can't use parameters in union queries in MSQuery > > -- > HTH > Nick Hodge > Microsoft MVP - Excel > Southampton, England > nick_hodgeTAKETHISOUT[ at ]zen.co.uk.ANDTHIS > www.nickhodge.co.uk > > "ioshicumine" <ioshicumine[ at ]discussions.microsoft.com> wrote in message > news:4A6BD3BD-4D4B-481C-9E51-EB41A2515C00[ at ]microsoft.com... > > Hi > > > > I have a problem in excel when i try to import data from MSSql with Import > > external data: I must use the same condition in two places in the same > > query..something like that: > > > > select col2 from d where col1=? union select col3 from d where id not in > > (select col2 from d where col1=?) > > > > this query works perfectly in MSSql, but when I try to do this in my > > ".dqy" > > file the excel tell me I have an error in my sql... > > > > pls help me > >
|