OLE DB help: Using data from an excel cell as a parameter in command text
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.