LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default problem

Can't you set the parameter values to cell values ?
So both "col1" value point to the same cell.

NickHK

wrote in message
oups.com...

NickHK wrote:
MSQuery seems to expect a separate input for each parameter; it cannot

tell
that "col1" is repeated and the repeat seems to cause a problem.
If you call the second instance something else, does it work ?
Also, how are you filling the parameters ?

NickHK

wrote in message
oups.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


yes...if I put, for example, a static value:
select col2 from d where col1=? union select col3 from d where id not
in
(select col2 from d where col1='X')
is working



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Colon at the end of excel file name(ex: problem.xls:1, problem.xls financeguy New Users to Excel 2 January 15th 10 01:15 AM
Started out as an Access problem. Now an Excel problem RobertM Excel Discussion (Misc queries) 2 April 26th 06 07:30 PM
problem with a conditional max problem Brian Cornejo Excel Discussion (Misc queries) 1 February 18th 05 06:25 PM
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? OCI Excel Programming 0 May 16th 04 10:40 PM


All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"