I used a parameterized query (where IDVALUE=?) to retrieve data from Oracle database with MS Excel. That works for me to input the parameter value (numeric). But for text/ string in cell A1 as ID, I have tried the following:
SELECT * FROM Table WHERE ID ="'?'"
SELECT * FROM Table WHERE ID ='?'
SELECT * FROM Table WHERE ID =?
- Input 'ABC123' with/ without a single quote in cell A1
- Use formula =CHAR(39)&A1&CHAR(39)
None of them works.
Read through this before, I still can't find success How to use parameterized query in Excel using column as parameter?
Your ideas/ suggestions are welcome.