however I have looked from the web I cant find a simple(!) example that would show how to use and have a SQL query that would use in the WHERE a dynamic parameter value.
What I'm looking for is that the end user would be able to change a value in the column in the spreadsheet (ParameterTable?) and refresh the data using this new value as a parameter.
Perhaps an example describes best what I'm after.
I would have a table in excel that would have two columns, named ParameterName and ParameterValue. These would then have values PARM1 and 1 (Sorry but appears that I cant post an image here)
The the query could be like this, so if 1=1 retrieve the current date (this is oracle but should be the same for most other databases)
SELECT SYSDATE FROM DUAL WHERE 1 = 1;
How should I change the above so that it would use the ParamaterName and ParameterValue, i.e. that the rightmost "1" could be changed dynamically to any value. If the value would be anything else than "1" no results would be returned.
Thanks in advance