I have a small problem that I am hoping someone will be able to shed some light on. We have a Excel spredsheet, that contains lots of rows of data, I have tried to get it moved to Access, but they want to keep the spreadsheet. So, basically all I need is for a box to pop up and ask the user to input a product name or part of the product name, finds that row and then uses the data to create the report. I am new to SQL so please forgive the crudiness of the code below, when I run the query I always get an error of not enough of parameters, any ideas.
SELECT Data.Revision
, Data.Description
, Data.Name
, Data.Site
, Data.Location
where Name.DAS = inputbox([Enter Name])
FROM C:\Public\DAS.xls.Data Data
One way would be to create the SQL in Excel with a parameter. Use the “Import External Data --> New Database query”. Choose a data source and add your columns. On the filter data page select the column and option and enter a “?”. This is the symbol for an unnamed parameter. Click through to the end. When it is executing it will ask you to enter a parameter value. To refresh use the red bang and it will ask again for a new parameter.
Yeah, but ‘?’ means a string containing a question mark while as ? by itself is a parameter. So if you want Toad to ask you for its value don’t quote it.