Query Parameters

G

Guest

I am trying to select data from an Oracle (external) table. I am using the
"Import Data" option. However, my "Parameter" button is not enabled (Grayed
out). Any idea why or how to get it enabled?

What I need to do is enable the query to pull in values based on the value
in a cell. for example, with the following query:
"SELECT EMP_DETAILS.DEPARTMENT_ID, EMP_DETAILS.LAST_NAME,
EMP_DETAILS.SALARY" & Chr(13) & "" & Chr(10) & "FROM EMP_DETAILS EMP_DETAILS"
& Chr(13) & "" & Chr(10) & "WHERE (EMP_DETAILS.LAST_NAME="MY_NAME)" -

I am simply trying to replace "MY_NAME with the value that is in Sheet 3,
cell B3.

Any help you could give me is most appreciated. I am stumped!
 
G

Guest

This was really helpful and it got me 90% there. However, what I need to do
is do a join based on 2 parameters. Every example I find only has one
parameter being repalced and whatever I try, it seemd to fail. Does anyone
have anyone have a snippet that can show how to handle multiple parameters.

For example:
"select X from employee where name=? and age > ?"

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top