|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
#1 |
|
Beta Member
Join Date: Jul 2010
Posts: 1
|
Hello,
I'm new to this I'm trying to retrieve data from an oracle database through an OLE DB connection in Microsoft Excel 2007. The query works fine when I write the SQL code in the command text area as select col1,col2,col3 from table1 where val1=5 I would like to use a variable instead of a fixed value for val1, and this variable should be the value of an excel cell, how can I do that? I want to able to have something like select col1,col2,col3 from table1 where val1=$A1, but I haven't been able to have this accomplished because I don't know the right format. Thank you |
|
|
|
|
|
#2 |
|
Site Team
Join Date: Jul 2009
Posts: 2,627
|
I've never tried doing the above since I've never needed to - but what error do you get when you run the latter select statement? Does it take the literal value $A1?
It may only be possible using a VBA macro or similar.
__________________
Save the whales, feed the hungry, free the mallocs. |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|